When i try to set the url of a page in wordpress (4.2) it keeps apending -2 to the end of the url, i guess its becuase this ulr already exists, but i checked and it dosnt, although at one time it did but that page has since been deleted. Any idea how i can use the url i want and get it to stop apending -2 ?

This is what im seeing the wp-admin dashboard when trying to change the url :

The edit box : edit box wp-admin url

Once i click OK :

once i click ok on changing the url

  • 1
    Clear the trash. – fuxia Jan 10 '15 at 12:33
  • @toscho i checked but there isnt anything in the trash – sam Jan 10 '15 at 13:05
  • 6
    I would search a database for the slug and see what comes up. Clearly WP thinks it still exists somewhere. – Rarst Jan 10 '15 at 14:10
  • Yeah I think it's wp-term table or column or something - could this be that longstanding bug that's fixed in 4.2? – NoBugs Apr 2 '15 at 2:22
  • 1
    NB: numeric post.names are also modified as it clashes with pagination: core.trac.wordpress.org/browser/trunk/src/wp-includes/… – ptica May 11 '18 at 12:09

I know this topic is old, but I was having the same issue, and none of the suggested fixes worked.

I didn't have any pages still in trash. I didn't have a category with the same name as my page. I didn't have another page with the same name. So I did something crazy. WP was trying to name my page as page-2, so I went to mywebsite.com/page to see what happened.

A page with a single photo popped up. I had a PHOTO with the same name as the page, and WP media manager gives photos permalinks based on the file name! Fix was to rename the photo (still keeping SEO in mind), and using the permalink editor for the page. TAH DAH! Like magic, it worked

  • Just came across this issue as well. I did a quick look up for the permalink in wp_posts.post_name and was able to find it quickly. In my case, it was an attachment as well. – Kevin Jung Jun 8 '17 at 14:24
  • Don't forget to save/update your page after editing the permalink! I found a page in the trash with the same name, removed it, edited the permalink but nothing was working. I couldn't even change it to something totally unrelated. I forgot to save the page...... – Scott Jungwirth May 22 '18 at 18:45
  • This comment saved me hours of troubleshooting, thank you. – hannebaumsaway Feb 18 '20 at 15:12

Most likely you at some point uploaded something called "about us". (You can see it if you go to site/about-us)

In this case you apparently have to delete and re-upload the file, after setting page permalink to what you want.

See https://core.trac.wordpress.org/ticket/32048, and https://core.trac.wordpress.org/ticket/24612

Not the answer you're looking for? Browse other questions tagged or ask your own question.