【背景】
导出了mysql数据库了。
下载了wordpress的文件了。
现在现在本地wordpress中导入试试,看看能否正常工作。
【折腾过程】
1.先导入数据库:
2.再去本地测试。
3.已把wordpress文件拷贝到了本地对应的目录了:
然后再去参考:
修改对应的
wamp_x64\www\backuped_wordpress\wp-config.php
中的内容。
DB_NAME改为backuped_wordpress;
DB_USER和DB_PASSWORD,需要参考一下,此刻本地的另外一个wordpress中的配置,分别是root和空。
改好后为:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | // ** 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 |
后来查了下,发现的确本身就是缺少这些文件:
所以,要去重新完整的下载和备份整个wordpress网站的文件。