首页 > 代码库 > WordPress搬家教程:换空间与换域名

WordPress搬家教程:换空间与换域名


select * from wp_options where option_name

update wp_options set option_value =http://www.mamicode.com/‘http://cndavy.vicp.net/wordpress‘ where option_name =‘siteurl‘;
update wp_options set option_value =http://www.mamicode.com/‘http://cndavy.vicp.net/wordpress‘ where option_name =‘home‘;


use wordpress;
update wp_options set option_value =http://www.mamicode.com/‘http://127.0.0.1:8080/wordpress‘ where option_name =‘siteurl‘;
update wp_options set option_value =http://www.mamicode.com/‘http://127.0.0.1:8080/wordpress‘ where option_name =‘home‘;

UPDATE wp_options SET option_value = http://www.mamicode.com/REPLACE(option_value,‘旧地址‘,‘新地址‘);

UPDATE wp_posts SET post_content = replace(post_content,‘旧地址‘,‘新地址‘);

UPDATE wp_posts SET post_excerpt= replace(post_excerpt,‘旧地址‘,‘新地址‘);

UPDATE wp_posts SET guid= replace(guid, ‘旧地址‘,‘新地址‘);

WordPress搬家教程:换空间与换域名