When transferring wordpress site from one server to another
First step is to udate wp-content foder on old site with new site’s wp-content
Then, database ( drop old database, import new database )
finally update wordpress database table with following step.
Login to your phpmyadmin dashboard, choose your database to update and click on sql query runner tab and run following queries one by one
UPDATE wp_options SET option_value = replace(
option_value, 'your old domain address', 'new domain address')
WHERE option_name="home" OR option_name="siteurl";
UPDATE wp_posts SET guid = replace(
guid, 'your old domain address', 'new domain address');
UPDATE wp_posts SET post_content = replace(
post_content,'your old domain address', 'new domain address');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'your old domain address', 'new domain address');
example of old domain address: ‘https://olddomain.com‘
example of new domain address: ‘https://newdomain.com‘
remember to update database prefix: wp_
update this value to that of old database in wp-config.php file through ftp