Homepage not loading, all other pages loading in WordPress migration

耗尽温柔 提交于 2021-01-28 18:01:01

问题


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.


回答1:


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');



回答2:


The behaviour you describe is not what I am seeing "But if they go to a specific link it loads fine and then so does the homepage.":

  • I get the same result following a home link as typing the URL so this is simply a configuration issue

Try this:

  • rename any .htaccess files .htaccess.temp
  • look directly in the wp_options table in the database to make sure all entries are correct
  • review the $site_url in php.ini
  • taking your test environment offline

This will eliminate most (all?) of the possible reasons your site is not behaving.

Good luck!




回答3:


Well, if you consider your problem something someone "wants" to do, then you'll find a lot of resources... for example:

https://wordpress.org/support/topic/using-a-different-wordpress-theme-for-a-single-page

Apparently you can create a page template and have the template load a different theme then all the other pages on the site. You can theoretically have every page on your WordPress install run a different theme.

Check things like home.php, front-page.php and what not to see if the homepage is running a template.




回答4:


Hey I faced the same issue. If you have just copied the Wordpress files for the mogration, check if you have copied the index.html file from your local site to your production site and delete it. This should fix the issue.



来源:https://stackoverflow.com/questions/26373510/homepage-not-loading-all-other-pages-loading-in-wordpress-migration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!