Why does WordPress add -2 to the end of my URL?

WordPress adds -2 because the slug you asked for is already taken or reserved, and two things cannot share one address. The usual holders are an older post, a page, an uploaded image with the same name, or a draft. Free the original slug and you can remove the suffix.

The uniqueness rules, by content type

Before saving a slug, core checks it against what already exists and appends -2, then -3, until it finds a free one. What it checks against depends on the type:

You are savingMust not match
A post (or other flat post type)Another post of the same type
A page (or other hierarchical type)Another page or media file with the same parent
A media fileAnything at all, in any post type

Three details follow from the table.

A page called Contact under About and another Contact at the top level do not collide, because their parents differ.

An uploaded file gets a slug too, taken from its file name. Upload pricing.png and an attachment with the slug pricing exists. A later top-level page called Pricing can then become /pricing-2/, because pages are checked against media.

Drafts and pending posts are not checked at all while they stay unpublished; the check runs when they are published or scheduled.

Slugs WordPress will not let you have

Some suffixes appear with no visible duplicate, because the slug is reserved:

  • Feed names such as feed, rss, rss2, rdf and atom, which would clash with feed addresses.
  • embed, used for the embeddable version of each post.
  • A number as a page slug, such as 2 or page2-style values, which would be read as pagination.
  • A number as a post slug when your permalink structure would confuse it with a date archive. With the Post name structure, a post titled "2026" cannot have the slug 2026, since /2026/ is the yearly archive. It becomes 2026-2.

For these, there is nothing to free up. Choose a different slug, for example year-2026-review.

Finding what holds the slug

Work through the likely holders in order:

  1. Posts and pages. Search each list for the title or slug. Remember scheduled and private items.
  2. Trash. A trashed post keeps its slug until another post asks for it; then core renames the trashed one with a __trashed suffix and hands the slug over. So Trash rarely blocks a slug, but an older core or a plugin can behave differently. Empty it if in doubt.
  3. Media Library. Switch to list view and search for the word. If a file holds the slug, edit the attachment and change its slug, or re-upload it with a more specific file name.
  4. Other post types. A product, portfolio item or page-builder template can hold a slug that affects pages.

Then edit your post, clear the -2 from the slug field and save. If the suffix returns, the holder is still there.

Does the -2 hurt SEO?

Not directly. /pricing-2/ ranks like any other address, and Google does not read anything into the digit. The costs are indirect:

  • It looks like a duplicate to people, and sometimes is one. If /pricing/ and /pricing-2/ both exist with similar content, you have two pages competing. Decide which is the real one and redirect the other.
  • It is a sign of a naming collision that will repeat. A site that names images after pages will keep losing clean slugs to media.

If the suffixed URL has been live for a while and has links, weigh the tidy-up against the move. Changing it is a URL change like any other and needs a 301 from the old address. For a post, WordPress redirects the old slug by itself; for a page it does not, so add one. Hydrogen SEO's Auto Redirection in the Redirection Manager creates the rule for either when you edit a published slug.

To stop media collisions for good, give uploads descriptive file names that differ from page names (pricing-table-2026.png), and redirect attachment pages to their files, which is a single switch covered in attachment page redirects.

Common questions

Why did my slug get -3 or -4?

The same check ran more than once: `-2` was also taken, so core kept counting until it found a free slug. Several unpublished copies or re-uploads of one file are the usual cause.

Can a post and a page have the same slug?

Core does not stop it, because posts are only checked against other posts. With a Post name structure both would claim the same address, so avoid it and give one of them a different slug.

Does deleting the old post free its slug immediately?

Yes. Once the holder is trashed or deleted, edit the newer post's slug to the clean version and save; core will accept it.

Why do my image URLs end in -1 instead of -2?

That is the file name, not the slug. When a file with the same name already exists in the upload folder, WordPress numbers the new file starting from -1.