I’m dealing with a strange WordPress issue that I haven’t encountered before. I have a page that’s been using the same URL slug for years, let’s say it’s called “services” at mysite.com/services.
This page has worked perfectly with the /services slug for about 5 years without any problems. But recently when I tried to edit this page, something weird happened. I went to mysite.com/services and clicked edit, but then I noticed the permalink had automatically changed to /services-2 and WordPress wouldn’t allow me to change it back to the original.
When I saved the page with the /services-2 slug, all the related subpages and media files got reassigned to this new URL. But here’s the really strange part - when I visited the original mysite.com/services URL, it still worked but now showed a completely different page with a new post ID that was created at the exact same time I saved the /services-2 version.
I managed to reproduce this behavior with another page called “contact”. This time instead of keeping the /contact-2 slug, I tried fixing it by going to permalink settings and switching from post name to default, then back to post name. But this just made things worse - now the original /contact page has a new post ID and all the original content moved to /contact-2.
I’m running WordPress 4.9.4 with all plugins updated. Has anyone seen this kind of slug duplication issue before?