Had a page called locations at mysite.com/locations/. Renamed it to /locations-old/ and created a new page also at /locations/. Ran into redirect issues and permanently deleted /locations-old/. However /locations/ returns as 404.
If I change my permalink settings to plain (/?p=123/), or if give the page a parent (/foo/locations/) the page works fine. If i change the slug name by a single letter the page also works.
I've tried everything I can think of and research to fix this problem including resetting permalinks, using flush_rewrite_rules();
(with and without changing my .htaccess permissions), deleting and remaking the page, deleting old page from database and optimizing my site.
My .htaccess is clean since this is a dev site.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
One interesting item of note is I used var_dump($wp_query);
on my 404 page and it returns a page id of the original /locations/ page even though I've removed it from wp_posts.
How do I fix this 404 and serve up my page correctly?