website is not loading home page (moving from one server to another server)

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 imagewebsite is not loading home page (moving from one server to another server)
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

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

You 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.org/wordpress-5.6-no-content.zip and upload the files from that zip to your new server

Method 2

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.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');
UPDATE wp_posts SET guid = replace(guid, 'oldurl.com', 'newurl.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x