您可以使用以下SQL查询替换旧的Wordpress URL:
# Options
UPDATE wp_options SET option_value = replace(option_value, \'website.com\', \'demo.websiteA.com\') WHERE option_name = \'home\' OR option_name = \'siteurl\';
# Posts & Postmeta
UPDATE wp_posts SET post_content = replace(post_content, \'website.com\', \'demo.websiteA.com\');
UPDATE wp_posts SET guid = replace(guid, \'website.com\',\'demo.websiteA.com\');
UPDATE wp_postmeta SET meta_value = replace(meta_value,\'website.com\',\'demo.websiteA.com\');
# Usermeta
UPDATE wp_usermeta SET meta_value = replace(meta_value, \'website.com\',\'demo.websiteA.com\');
# Links
UPDATE wp_links SET link_url = replace(link_url, \'website.com\',\'demo.websiteA.com\');
# Comments
UPDATE wp_comments SET comment_content = replace(comment_content , \'website.com\',\'demo.websiteA.com\');
UPDATE wp_comments SET comment_author_url = replace(comment_author_url, \'website.com\',\'demo.websiteA.com\');
将“website.com”替换为旧URL
将“demo.websiteA.com”替换为新的URL