UPDATE wp_options SET option_value = replace( option_value, '旧域名', '新域名' );
UPDATE wp_posts SET post_content = replace( post_content, '旧域名', '新域名' ) ;
UPDATE wp_posts SET guid = replace( guid, '旧域名', '新域名' ) ;
UPDATE wp_comments SET comment_content = replace(comment_content, '旧域名', '新域名') ;
UPDATE wp_comments SET comment_author_url = replace(comment_author_url, '旧域名', '新域名') ;
若是多站点,则还有表 wp_blogs:
update wp_blogs set domain='新域名';