最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】本地测试搬家过程中导出的wordpress文件和数据库是否能正常工作

WordPress crifan 2260浏览 0评论

【背景】

导出了mysql数据库了。

下载了wordpress的文件了。

现在现在本地wordpress中导入试试,看看能否正常工作。

【折腾过程】

1.先导入数据库:

【记录】通过phpMyAdmin导入mysql数据库

2.再去本地测试。

3.已把wordpress文件拷贝到了本地对应的目录了:

has copy local wp files

然后再去参考:

WordPress如何完整搬家的经验分享

修改对应的

wamp_x64\www\backuped_wordpress\wp-config.php

中的内容。

DB_NAME改为backuped_wordpress;

DB_USER和DB_PASSWORD,需要参考一下,此刻本地的另外一个wordpress中的配置,分别是root和空。

改好后为:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'backuped_wordpress');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', '');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

4.都准备好了之后,就可以去输入对应的地址试试了:

http://localhost/backuped_wordpress

结果无法进入,却弹出对应的保存文件对话框,具体过程见:

【已解决】在线的wordpress搬家到本地结果无法打开首页却出现文件保存对话框和Front to the WordPress application

5.不过虽然可以打开页面,但是却又出错了“failed to open stream: No such file or directory in ”

( ! ) Warning: require(E:\dev_install_root\wamp_x64\www\backuped_wordpress/wp-includes/load.php): failed to open stream: No such file or directory in E:\dev_install_root\wamp_x64\www\backuped_wordpress\wp-settings.php on line 21

failed to open stream No such file or directory in

后来查了下,发现的确本身就是缺少这些文件:

indeed lack many files

所以,要去重新完整的下载和备份整个wordpress网站的文件。

转载请注明:在路上 » 【记录】本地测试搬家过程中导出的wordpress文件和数据库是否能正常工作

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.186 seconds, using 22.11MB memory