WordPress adds a 2 to my post slug but I don’t have any other pages or posts by that name

If WordPress adds a 2 to the end of your post or page URL (slug) and you have checked to make sure you don’t have a post of that name anywhere (including the trash!) then it could be because you uploaded an image of the same name. Let’s check:

  1. In the backend of WordPress, click on Media in the side menu.
  2. In the search field, search for the last part of the URL but remove the -2 (e.g. http://www.yourdomain.com/not-this/search-this-2/)
  3. If you find a matching image, click on it to open it up.
  4. Scroll to the bottom of the right column and click on “Edit more details” at the very bottom.
  5. At the top of the page under the title field click to edit the URL of the media attachment page.
  6. Change the URL.
  7. Click on the Update button.

There you go! You should now be able to go back to your post or page and edit the URL to remove the -2.

 

 

Related Posts

One thought on “WordPress adds a 2 to my post slug but I don’t have any other pages or posts by that name

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha loading...