I have a wordpress site and i want same site with other domain name at same server. I moved all files and folders to new domains directory and also successfully moved database. My admin panel is working fine but when i enter url of homepage , it does not load homepage as you can see in image I also chane url of site and home from database. what can be a issue? and also i am getting an error from site health screen and all other things are working properly. any solution guys?
The Rest API encountered an unexpected results
I have a wordpress site and i want same site with other domain name at same server. I moved all files and folders to new domains directory and also successfully moved database. My admin panel is working fine but when i enter url of homepage , it does not load homepage as you can see in image I also chane url of site and home from database. what can be a issue? and also i am getting an error from site health screen and all other things are working properly. any solution guys?
Share Improve this question asked Jan 8, 2021 at 5:45 Syze DeveloperSyze Developer 231 gold badge1 silver badge3 bronze badgesThe Rest API encountered an unexpected results
2 Answers
Reset to default 0You appear to be missing some files. There should be an index.php
file in that root directory for example. Try downloading a fresh copy of WordPress from http://wordpress/wordpress-5.6-no-content.zip and upload the files from that zip to your new server
You'll also need to update the URLs in the database, I run the following sql query in phpmyadmin > database > query after a migration.
swap wp_
with your db table prefix if different from default, & adjust any URLs as needed:
UPDATE wp_options SET option_value = replace(option_value, 'oldurl', 'newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl', 'newurl');
UPDATE wp_posts SET guid = replace(guid, 'oldurl', 'newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl','newurl');