JLF JLF - 3 months ago 7x
PHP Question

Homepage not loading, all other pages loading in WordPress migration

Nobody has had this problem yet it seems.

I just migrated a small WordPress website from my test server-space on iPage over to a client's server on HostGator and while I am logged into WordPress on the new server - the website shows up fine, but if I clear my cache and come on as a new user (as my boss did) they find the silly 2014 theme with no content. But if they go to a specific link it loads fine and then so does the homepage.

I have searched this topic extensively but found nothing. I have tried other migration problems' fixes such as:

  • adding a new php.ini

  • uploading new indexes to the root dir and theme dir

  • saving permalink settings again, and then changing and saving again

  • updating WP version

  • deactivating plug-ins

  • changing .htaccess lines

Why was it working perfectly on the old server location but not the new?

Y'all are my last resort. Is there some sort of cache error (or normal activity that needs overriding) going on? .htaccess? index.php? Is it HostGator's servers maybe?

Please help!

UPDATE: A combination of changing the site/home url in WP_Options and re-saving the permalinks fixed this issue for me.


One of the reasons why wordpress urls contained in the BD pointing to the url old, running this script in phpmyadmin can solve:

UPDATE wp_options SET option_value = REPLACE(option_value,'old_site','new_site');
UPDATE wp_posts SET post_content = REPLACE(post_content,'old_site','new_site');
UPDATE wp_posts SET guid = REPLACE(guid,'old_site','new_site');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value,'old_site','new_site');

Also exist the possibility that your hosting account contains a folder with your username, in the wp_options table may be included, for example upload_path: /home/[folder_old_id]/public_html/wp-content/uploads

UPDATE wp_options SET option_value = REPLACE(option_value,'folder_old_id','folder_new_id');