这段代码可以帮助您,只需更改mysite即可。com和www.mysite。com并转到phpMyadmin运行该Sql代码:
UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_options SET option_value = REPLACE(option_value, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_posts SET post_content = REPLACE(post_content, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_posts SET post_excerpt = REPLACE(post_excerpt, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_posts SET guid = REPLACE(guid, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_users SET user_email = REPLACE(user_email, \'mysite.com\', \'www.mysite.com\');
UPDATE wp_users SET user_url = REPLACE(user_url, \'mysite.com\', \'www.mysite.com\');
或
您可以使用that 简单的工具,它会为您生成它。如果使用不同的表前缀,只需更改wp_
使用您的表前缀。