Guo Qiang

Wordpress 迁移更新域名或者IP

发布日期 2020-10-14 21:46:16已读 633 次FAQ
image

WordPress 整体迁移后,必须在新主机中输入如下 sql 语句,将老域名 (IP) 更新为新域名 (IP)


UPDATE wp_options SET option_value = replace( option_value, 'http://www.old.com', 'http://www.new.com' ) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace( post_content, 'http://www.old.com', 'http://www.new.com' ) ;
UPDATE wp_posts SET guid = replace( guid, 'http://www.old.com', 'http://www.new.com' ) ;


Copyright © 2019~2024 Guo Qiang
Pages viewed 31,263,101