将以下语句中域名替换后执行

UPDATE wp_options SET option_value = REPLACE(option_value, 'http://老域名', 'http://新域名') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://老域名', 'http://新域名');

UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://老域名','http://新域名');

UPDATE wp_comments SET comment_content = REPLACE (comment_content, 'http://老域名', 'http://新域名');

UPDATE wp_comments SET comment_author_url = REPLACE (comment_author_url, 'http://老域名','http://新域名');

UPDATE wp_posts SET guid = REPLACE (guid, 'http://老域名', 'http://新域名') WHERE post_type = 'attachment';

就完成了域名更新

Last modification:April 18th, 2020 at 08:17 pm
如果觉得我的文章对你有用,请随意赞赏