WordPress 更换域名的方法

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

在 PHPMyadmin 中完成以上修正即可。

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.