这不是什么大问题。您的数据库包含无法自动转换的所有以前的链接。有两种解决方案:
输入wp-config.php
添加此代码:
define(\'WP_HOME\', \'http://\' . $_SERVER[\'SERVER_NAME\']);
define(\'WP_SITEURL\', WP_HOME . \'/\');
将“oldurl”替换为上一个链接,将“newurl”替换为当前链接,从而更改以下SQL:
UPDATE wp_posts SET guid = replace(guid, \'oldurl\',\'newUrl\');
UPDATE wp_posts SET post_content = replace(post_content, \'oldurl\', \'newUrl\');
UPDATE wp_links SET link_url = replace(link_url, \'oldurl\', \'newUrl\');
UPDATE wp_links SET link_image = replace(link_image, \'oldurl\', \'newUrl\');
UPDATE wp_postmeta SET meta_value = replace(meta_value, \'oldurl\', \'newUrl\');
UPDATE wp_usermeta SET meta_value = replace(meta_value, \'oldurl\', \'newUrl\');
UPDATE wp_options SET option_value = replace(option_value, \'oldurl\', \'newUrl\') WHERE option_name = \'home\' OR option_name = \'siteurl\';
在数据库中运行这些SQL查询,如果有不同于
wp_
.