I'm migrating one of my WordPress sites from a development version to the live version. The problem I'm having is with just the homepage links.
- the homepage link in the masthead is redirecting to the dev version.
- type the homepage URL into the browser, it redirects to dev.
- click the 'visit site' link in wp-admin, it redirects to dev.
The reasons might be because the migration didn't replace links in the database tables. And! Just to make it more interesting, my first migration failed. So, for a week I redirected the URL in cPanel to the dev version. I've since deleted this redirection, and every page is OK but home.
For a little context, lets say the live site URL is: http://x.tna.com
And the dev site is: http://dev.x.tna.com
. That's the same for the server directories: live.x
and dev.x
. I also used git so I have a repo git.x
. There are two databases, tna_x
and tna_x_dev
.
I've remade the entire migration, including:
- (on local using vim) verify all the links in the database (download to local, find and replace all URL subdomain instances of
dev.
with empty string) - (cPanel/subdomains) Deleted redirection to
dev.x.tna.com
. - (cPanel/Cache Settings) Disable cache for subdomain
x.tna.com
. - (WordPress Admin, Settings > General) Verify settings reflect the correct URL.
- (SSH) I searched in WordPress files,
grep -R dev
, and didn't find anything - (phpMyAdmin) I queried the database for
dev
, and didn't find anything. - (Wordpress Admin, Settings > Permalinks) Chnage permalink settings.
- (local browser) delete site cookies
All non-homepage links in x.tna.com
are fine. I also have access wp-admin
and add content and do other stuff.
Where is this setting hiding?
// Edit. I added #7 & #8; The .htaccess
file was unchanged, but I recreated to be sure. And I thought maybe it could be the browser, so I added #8