2012-12-10 66 views
0

我已經接受了將2010年製作的Wordpress網站移動到新服務器的任務。我沒有訪問舊的網站管理面板,但已被授予源文件和數據庫的導出版本。該網站安裝了一些插件,我認爲這將更難以通過全新的安裝傳輸所有舊文件等,因此我想讓舊網站的工作。將3年前的Wordpress網站移動到新服務器

我已將所有文件複製到我的測試服務器,並對wp_config.php文件進行了更改以查找新的數據庫位置。問題是,所有的鏈接似乎來自舊網站。從邏輯上講,我認爲我需要改變絕對路徑,然後改變各個帖子的鏈接。

我在哪裏可以更改這些值,並且是否有任何其他文件/值需要更改以確保網站完美運行?

回答

0

你會看到很多不同的方法(遷移腳本/插件,導出/導入等)。我在這裏假設您的問題源於更改站點運行的域,這與更改服務器不同?

對於我來說,轉移Wordpress網站的最佳途徑是使用我在此給出的以下答案--Interconnectit腳本是一個重要的時間和麻煩保護程序。

How to push wordpress from mamp into hostgator

0

通常這會做,在你的wp-config.php文件:

define('WP_SITEURL', 'http://new-path.com'); 
define('WP_HOME', 'http://new-path.com'); 

如果那還不夠添加一個名爲 「查找和替換」 插件,並搜索舊的URL,並換上新的。

+0

嘿忍者,這些定義並不位於此wp_config,可能是一個很老的WordPress版本(3.1版。 4) – mauzilla

+0

您可以自己添加它們,應該支持您不使用WP 2.0或更低版本。 – ninja

0

以下方法適用於我。主題也正確遷移。

如何從一臺服務器移動的WordPress安裝到另一臺服務器(具有不同域名)

1.Export Files & DB from the source server. 
2.Import Files & DB into the target server (As it is) 
3.Delete *_options table from the target server DB. 
4.Export only the *_options table from the source server DB. 
5.Find & Replace the old domain name with the new domain name in the above .sql file 
6.Import the above modified *_options table into target server DB. 
7.Open wp-config.php file in target server and update the new DB connection info. 
8.Open .htaccess file in target server and put the default entry for WordPress. 
9.Login into the target server WP Admin Panel 
10.Install and activate a plugin called 「Velvet Blues Update URLs」. 
11.Go to Tools -> Update URLs 
12.Replace all the following possible URLs with the new domain name 

http://www.example.com 
https://www.example.com 
http://example.com 
https://example.com 

13.Test the target server site 
相關問題