I wasted several hours today on a crazy problem where I was using pretty permalinks in WordPress 4.0. The website is a car dealership, and I needed to create a page with the title as “86”.
I noticed that the slug came up as 86-2, and after a while, I cleared the trash (not that there was an 86 page there), and tried to change it to 86. It didn’t change. I gave it up as a lost cause.
Then the customer demanded that there not be a -2 on the url.
Next came scanning through the wp_posts table in the database with phpMyAdmin, looking for a conflict. I couldn’t find one.
More searching on Google for changing permalinks, slugs, duplicates, and then (after much tearing out of hair and frustration, optimising the database etc etc etc) I found the answer.
WordPress doesn’t like slugs that are purely numbers. They are reserved.
I tested creating a brand new page with title 99. The slug became 99-2.
The only successful way I found to fix this issue was installing yet another plugin – Permalink Editor. In the page editor, after activating the plugin, underneath the permalink there is a “customize” button. I entered “86”, I saved, I viewed. Yay! Issue resolved.
Edited to add: I have since found another plugin, more recently updated and ten times more popular that also serves this function, so I’ve replaced Permalink Editor in favour of a plugin that has more enduring commitment: Custom Permalinks. Same story – doesn’t work in Quick Edit, so don’t try there!
If you are getting a -2 and it’s not because the slug you want ends in a number, check your page/post trash, and check that you don’t have a category or tag with the same slug.