返回wp数据库导致错误跳过


Back wp database lead to wrong skip

我在domain.com上构建了wp,并在127.0.0.1上构建了其他wp。现在,我从domain.com上的后端转储数据库,并使用命令将其转储到本地机器上的mysql数据库中。

mysqldump -u root -p wpdatabase > back.sql  #after i connect the remote vps
#download the back.sql file into local machine with filezilla on /home/back.sql
mysql -u root -ppassword wp_test < /home/back.sql  #on local console

当我输入127.0.0.1时,我的wp状态良好,但当我想登录时,
在firefox中输入127.0.0.1/wp-login.php
它跳到CCD_ 2上。

如何修复?

您可以在wp-config.php:中使用RELOCATE常量

define( 'RELOCATE', true );

然后导航到http://newdomain.com/wp-login.php和登录。WordPress将自动更新数据库。成功登录后取消设置此行。

更多信息:更改网站URL:重新定位方法

您需要更新数据库中对domain.com的所有引用。查看Codex