WordPress adds -2 when the clean slug you requested is already assigned to another object. To remove it, locate the post, page, or media attachment holding that slug, rename or permanently delete the obsolete item, then edit the intended item’s slug. If the suffixed URL has already been published, redirect it to the clean URL before changing anything.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
What the -2 means
The suffix is a collision warning, not random formatting. WordPress core uses the wp_unique_post_slug() function to make each requested post slug unique. When the requested value is already in use, WordPress returns a modified value with a number appended. The practical explanation in WordPress.com support is: “If WordPress detects the same link being used more than once, it will add a number to the URL to differentiate it.”
As an Amazon Associate I earn from qualifying purchases.
The conflict can involve more than two visible blog posts. Depending on the content type and URL context, WordPress checks regular posts, hierarchical pages, and attachment records. A file in the Media Library can therefore reserve a slug even when Pages and Posts appear to contain no duplicate. An imported item or an old page moved to Trash can also be the object you need to investigate.
-2 tells you that WordPress found a competing slug while saving the item. It does not identify which object caused the conflict, and changing the site-wide permalink pattern will not resolve the duplicate itself.
#1 Best Overall
Choose the safe remedy before editing
First decide whether the older content must remain available and whether the suffixed address is already in use. The answer determines whether you rename content, delete it, or preserve both records with a redirect.
| Situation | Recommended action | Effect on URLs |
|---|---|---|
| Both items are needed | Give the existing item a distinct, descriptive slug, then assign the clean slug to the intended item. | The renamed item receives a new URL; redirect its former URL if it was published. |
| The conflicting item is obsolete and no longer needed | Move it to Trash, confirm it is safe to remove, and permanently delete it before reusing the slug. | The obsolete URL stops serving that content. Keep a redirect if visitors or links still use it. |
The -2 URL already appears in search results, menus, posts, or external links |
Resolve the collision, change the target slug, and add a redirect from the old suffixed address to the clean address. | Visitors following the old address can reach the retained content. |
| You are considering a change to the whole permalink structure | Do not use that as a fix for one duplicate. Edit the individual slug instead. | A structure change can alter many URLs and does not automatically create redirects. |
Before deleting content or changing several slugs, make a database backup. Keep a note of the old and new addresses so you can test them and create the correct redirect without guessing.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Step 1: Search every place WordPress can hold the slug
- Check Pages. In the dashboard, open Pages and search for the clean slug and for the title of the item you are editing. Open likely matches and inspect the permalink or slug field, not only the display title.
- Check Posts. Open Posts and repeat the search. Two items can have different titles while sharing the same requested slug, so search the slug itself where the list screen permits it and inspect older content manually when necessary.
- Check Media. Open Media > Library and look for an attachment whose generated or edited slug matches the clean value. Attachments participate in slug conflicts, so omitting the Media Library is a common reason the suffix returns.
- Check Trash. Review the Trash views for Pages and Posts, and inspect discarded media where your installation exposes it. An obsolete duplicate may still need to be permanently deleted before WordPress will allow the clean slug to be reused. Do not empty Trash until you are certain the content, metadata, and any links to it are no longer required.
Record the object type, its current slug, and its current URL. If several records appear related, change only one at a time and save before testing; that makes it clear which change released the slug.
Step 2: Release the clean slug
When both pieces of content must stay
Open the item that currently owns the clean slug. In its editor, use the permalink, URL, or slug control to replace that value with a distinct slug. Make the replacement meaningful rather than adding an arbitrary string: for example, distinguish an archive page from a current guide by adding a year or content descriptor that accurately describes the older item. Save or update the item, then verify its new address.
Rank #2
Changing the first item gives the desired slug a free namespace. It also changes that item’s URL, so treat the former address as a published URL if it has been shared, indexed, or linked internally.
When the duplicate is genuinely obsolete
Move the conflicting item to Trash from its edit screen or list view. Confirm that no one needs its content, attachments, comments, or URL. If it is safe to remove, permanently delete it rather than leaving it in Trash. WordPress.com explains that permanent deletion removes the item from the site’s database. Keep a backup until you have verified that the retained page works and that any needed redirect has been recorded.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Do not delete an item merely because its title looks old. A media attachment, landing page, or imported record may be referenced by another page even when it is not linked from the main navigation. If you cannot establish that the item is obsolete, rename it instead and preserve both records.
Step 3: Change the target item from -2 to the clean slug
- Open the post or page whose URL currently ends in
-2. - In the editor, open the permalink or slug control. Depending on the editor version, this appears in the document settings, the URL panel, or beside the title after the item has been saved.
- Delete the numeric suffix and enter the now-available slug. Use the slug form WordPress accepts for your site; do not paste the full protocol and domain into a field that asks only for the slug.
- Save or update the item. WordPress documentation confirms that a post or page slug can be edited after the item has been saved.
- Copy the resulting clean URL for testing and for the redirect record.
If WordPress immediately restores -2, stop editing the target and repeat the inventory. A remaining Page, Post, attachment, or discarded duplicate still owns the requested value, or a redirect is making the old address appear to persist. Re-saving the same item without releasing the collision cannot force two objects to share one slug.
Step 4: Test the clean URL and the old URL
Open the clean address in a private browser window or a session that is not relying on an editor preview. Confirm that it loads the intended title and content, rather than another object that happened to use the slug. Test the site’s normal navigation and any internal links that pointed to the suffixed address.
Then open the old -2 address. For a newly created draft that was never shared, a missing response may be acceptable. For a published address, it should go to the retained content through the redirect you create in the next step. If it displays the wrong page, inspect redirect rules and search the content types again before making another slug change.
What to verify on the page
- The browser address ends with the intended clean slug after any redirect finishes.
- The page title and body belong to the item you edited, not to the former slug owner.
- Images and other media still load from their own addresses.
- Menus, related-content links, and prominent internal links no longer point readers to the obsolete URL.
- The old suffixed address has one deliberate destination rather than a chain through several intermediate URLs.
Step 5: Redirect an established -2 URL
Changing a slug does not make old links follow the content automatically. WordPress.org’s Permalinks documentation describes these addresses as intended to be permanent and warns that changing the permalink structure does not create redirects for existing posts or pages. The same practical concern applies when you edit an individual slug: preserve the old address if people or search engines may still request it.
Using a WordPress redirect plugin
- Install or open the redirect tool you already use for the site.
- Create a rule whose source is the complete old path ending in
-2. - Set the destination to the clean path, using the exact capitalization and trailing-slash style used by the site.
- Save the rule and test the old address in a private window.
- Confirm that the final page is the intended item and that the browser does not pass through another obsolete URL.
Use one canonical destination. Do not point the old address to a category, home page, or unrelated replacement simply to avoid an error; visitors should arrive at the closest surviving content.
Rank #4
Server-level redirects
If your site already manages redirects at the web-server level, add the old-to-new rule there according to that server’s configuration process. Coordinate with any WordPress redirect plugin so the same path is not assigned competing destinations. The important information is the exact old path and the exact retained path; the mechanism is secondary to avoiding conflicting rules.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Permalink settings are not individual slugs
The Settings > Permalinks screen controls the pattern surrounding a URL, such as the placement of dates, categories, or the post name. The slug control inside a post or page controls that one object’s final name within the pattern. They are separate settings.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesIf you have changed permalink configuration for another reason, saving the Permalinks screen can refresh WordPress rewrite rules. That refresh cannot make two objects share one slug, however. You still have to resolve the duplicate and edit the target item individually.
Changing the entire structure to remove one -2 is disproportionate and risky. It can alter many existing addresses at once, and WordPress does not create redirects for those old URLs merely because the structure was changed. If a structure change is unavoidable, inventory affected URLs and prepare a redirect plan before applying it.
Best Value
Troubleshooting when the suffix will not disappear
The clean slug is still rejected
- Search Pages, Posts, and Media again, including titles that differ from the target title.
- Review Trash and permanently delete an obsolete duplicate only after confirming it is safe to remove.
- Look for an attachment or imported item that owns the slug.
- Save the renamed conflicting item before attempting to edit the target. Unsaved changes do not release the old value.
The clean URL opens the wrong content
Another object may still be assigned that path, or a redirect rule may send the request elsewhere. Inspect the slug fields of the object that loads, then review redirect-plugin and server rules. Correct the collision first; changing more permalink settings can make diagnosis harder.
The old address produces an error after the edit
That is expected only when the address was never meant to remain available. If the URL was published or shared, add a redirect from the exact old path to the retained clean path and test it outside the editor. A redirect cannot fix a misspelled source path, so copy the old address from a real link or browser history rather than retyping it from memory.
Free tools Windows power users keep installed
One-click scans. No signup required.
A bulk cleanup changed more URLs than intended
Stop further edits, restore from the backup if necessary, and separate the individual-slug work from any site-wide permalink changes. The goal of removing one suffix is an individual collision fix, not a redesign of every URL.
Examples of common collisions
A page and a newer post share a topic name
An older page uses the clean slug, while a new post with the same requested name receives -2. Rename the older page to a distinct, accurate slug if both are useful. Update the new post to the clean slug, then redirect the published suffixed post URL.
An attachment silently owns the name
A media upload has a generated attachment slug matching the page you are creating. The page receives -2 even though the Posts list contains no duplicate. Find the attachment in Media, rename it when it must remain, or permanently delete it when it is genuinely unused. Only then edit the page slug.
An obsolete draft was discarded but not removed
An earlier version was moved to Trash, leaving the requested value unavailable in your workflow. Verify that the discarded item is no longer needed, permanently delete it, and save the intended item with the clean slug. If the discarded URL had already been published, preserve a redirect instead of treating deletion as permission to discard its visitors.
Recommended Free Tools
Quick Recap
A repeatable checklist
- Back up the database before deleting content or changing multiple slugs.
- Write down the current clean URL and the current
-2URL. - Search Pages, Posts, and Media for the slug and the same subject.
- Inspect Trash and identify obsolete duplicates.
- Rename the existing item or permanently delete it only when appropriate.
- Edit the target item’s permalink control and save the clean slug.
- Open the clean URL and confirm it serves the intended content.
- Create and test a redirect from the old suffixed address when that URL was published.
- Review internal links and redirect rules for the old path.
- Leave the global permalink structure unchanged unless you have a separate, documented migration plan.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




