繁体   English   中英

在没有数据库备份的情况下还原WordPress网站?

[英]Restore WordPress site without DB backup?

我正在尝试还原一个有文件备份的WordPress网站,但手头没有数据库备份。

我设法通过在cPanel中还原备份来部分启动该站点-现在该站点的所有页面都在工作,但是由于没有可用的数据库(wp-config.php指向“以前是我的数据库”)访问该站点.com / wp-admin呈现此错误:

Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

我知道我不备份网站数据库而犯了一个严重错误。

在这种情况下,有什么方法可以访问wp-admin? 我不能用新的数据库“模拟”旧的数据库吗? 任何能够访问wp-admin的东西

使用全新安装配置核心Wordpress,将您当前的Wordpress文件指向刚创建的新数据库

您应该将所有设置(从DB_NAME,DB_USER,DB_PASSWORD ...... AUTH_KEY,SECURE_AUTH_KEY .....直到table_prefix复制)从新安装的wp-conf复制到旧的安装

您将丢失几乎所有存储在db中的数据(例如用户等),但是,如果您的主题是基于文件的,那么您应该可以设置页面

这是特里尔(Triel),我认为应该工作,因为在这种情况下看不到任何其他方法。

“我不能用新的数据库'模拟'旧数据库吗?可以访问wp-admin的任何内容”只需在服务器上创建一个新的mysql数据库,并将其信息放入wp-config.php文件中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM