WordPress Migration

When you migrate a domain account (***. Tld) to the subfolder (***. Com / username), you must change the old URLs in many places, not just change the URL in / wp-admin /

How to do this?

Execute queries in mysql (eg Phpmyadmin):

UPDATE wp_options SET option_value = replace (option_value, & # 39; http: //www.oldurl & # 39 ;, & # 39; http: //www.newurl & # 39;) WHERE option_name = & # 39; home & # 39; Or option_name = & # 39; siteurl & # 39 ;;

UPDATE wp_posts SET guid = replace (guid, & # 39; http: //www.oldurl & # 39 ;, & # 39; http: //www.newurl & # 39;);

UPDATE wp_posts SET post_content = replace (post_content, & # 39; http: //www.oldurl & # 39 ;, & # 39; http: //www.newurl & # 39;);

UPDATE wp_postmeta SET meta_value = replace (meta_value, & # 39; http: //www.oldurl & # 39 ;, & # 39; http: //www.newurl & # 39;);

Code (marked):