wordpress更改域名后修改附件和链接路径

UPDATE wp_options SET option_value = REPLACE(option_value,'http://www.php126.com/','http://keminar.linuxphp.org/');

UPDATE wp_posts SET post_content = REPLACE(post_content,'http://www.php126.com/','http://keminar.linuxphp.org/');


UPDATE wp_posts SET guid = REPLACE(guid,'http://www.php126.com/','http://keminar.linuxphp.org/');

UPDATE wp_users SET user_url = REPLACE(user_url,'http://www.php126.com/','http://keminar.linuxphp.org/');

UPDATE wp_users SET comment_content = REPLACE(comment_content,'http://www.php126.com/','http://keminar.linuxphp.org/');

UPDATE wp_posts SET pinged = REPLACE(pinged,'http://www.php126.com/','http://keminar.linuxphp.org/');

UPDATE wp_posts SET to_ping = REPLACE(to_ping,'http://www.php126.com/','http://keminar.linuxphp.org/');

直接到数据库执行上面的SQL,把域名改为你自己的。前面是旧域名,后面是新域名

上一篇: ssh Read from remote host Connection reset by peer   下一篇: mysql替换数据库中的部分内容

提交疑问

请先登录 QQ微博登录

回顶部