Migration of WordPress

When you migrate an account from the domain (***. Tld) to a subfolder (***. Com / username), you must modify the old URLs in many places and not just edit those of / wp-admin /.

How to do that?

Execute queries in mysql (eg Phpmyadmin):

UPDATE wp_options SET option_value = replace (options_value, 'http: //www.oldurl&#39 ;,' http: //www.newurl') WHERE option_name = 'home'; OR option_name = & sserver; & nbsp;

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

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

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

Code (markup):