簡體   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