How to Move WordPress Blog to New Domain or Location如何移動的WordPress所博客新的網域或位置
For blogger who self-hosts the WordPress blog publishing system on a web hosting server with own registered domain name, sometimes, you may decide to reorganize the blog link URL to make it tidier or to reflect new focus or theme of the blog.對Blogger誰自我承載的WordPress所博客出版系統對虛擬主機服務器與自己註冊的網域名稱,有時候,您可能決定進行重組,博客鏈接網址,使之有條理,或以反映新的重點或主題的博客。 If you decide to change the URL or link location of your WordPress blog due to changing of domain name (such as from http://www.old-domain.com/ to http://www.new-domain.com/) or the blog to another directory location (such as from http://www.domain.com/ to http://www.domain.com/blog/), there are some steps that should be done to ensure the proper migration and no breaking links.如果您決定要更改網址或鏈接的位置,您的WordPress所博客由於不斷變化的域名(如從http://www.old-domain.com/ ,以http://www.new-domain.com/ )或博客的另一個目錄的位置(如從http://www.domain.com/ ,以http://www.domain.com/blog/ ) ,也有一些步驟,應該這樣做,以確保適當的遷移和沒有打破的聯繫。
The tricky part when moving WordPress blog to another location is that WordPress is using absolute path in URL link instead of relative path in URL link location when stores some parameters in database.棘手的一部分,搬家時的WordPress所博客到另一個位置是在WordPress是使用絕對路徑,在URL連結,而非相對路徑在URL鏈接的位置時,商店的一些參數在數據庫中。 Within blog posts’ contents itself, users may also use the old URLs when creating reference backlinks.在博客帖子的內容本身,用戶也可以使用舊的網址時創造的反向參考。 All these values in the database will need to be changed when WordPress is moved.所有這些價值觀在該數據庫將需要改變時,在WordPress是感動。 The following guide will show you which database fields that has references or values related to blog’s URLs that you want to modify.以下指南將顯示出哪些數據庫領域,已考或價值相關的博客的網址,您想要修改。 Note that this guide is not about how to move WordPress blog from one server or host to another new hosting service.請注意,這個指南是不是有關如何移動的WordPress所博客從一台服務器或主機到另一個新的託管服務。
Once the blog has been moved (all files copy over in case of moving location or server or new domain name properly propagated across Internet for new domain name), the first thing to change is to tell WordPress the new blog location (wp-config.php should be no changes, and .htaccess file should be also no changes. If for some reason mod_rewrite rules for friendly URLs no longer works, you can always regenerate the .htaccess file via WP Administration’s Update Permalinks page).一旦博客已移至(所有文件複製在案件移動位置或服務器或新的域名,妥善宣揚全國互聯網為新的網域名稱) ,第一件事,要改變是告訴在WordPress新博客的位置( wp-config. PHP中不應有任何的變化, 。 htaccess的檔案應該也沒有變化。如果由於某種原因, mod_rewrite規則友好的URL不再起作用,您可以隨時再生。 htaccess的檔案經可濕性粉劑政府當局的更新永久性頁) 。 This value can be changed via WordPress Options page, but if you no longer able to access to old blog URL, you have to modify the value via MySQL database.這個值是可以改變的通過的WordPress選項頁,但如果你不再能夠進入舊的博客地址,你必須修改該值通過MySQL數據庫。
Note: The guide uses SQL statements based on注:指南使用SQL語句的基礎上 MySQL replace() function MySQL的取代( )函數 to modify the database.修改數據庫。 To run SQL queries, login to MySQL database that houses WordPress tables via phpMyAdmin or login to the DB server and run MySQL client as root.要運行SQL查詢,登錄到MySQL數據庫認為,房子的WordPress表通過phpmyadmin或登錄到數據庫服務器和運行MySQL客戶端,以root的身份。
To update WordPress options with the new blog location, use the following SQL command:更新的WordPress的選擇與新的博客的位置,請使用下面的SQL命令:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; 更新wp_options設置option_value =取代( option_value , ' http://www.old-domain.com ' , ' http://www.new-domain.com ' )凡option_name = '家'或option_name = ' siteurl ' ;
After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guid field.之後,您將需要修復的URL的職位,以及在WordPress的頁面,翻譯後段塞,並存儲在數據庫中wp_posts表的GUID領域。 The URL values in this field are stored as absolute URLs instead of relative URLs, so it needs to be changed with the following SQL query:網址的價值在這一領域的存儲為絕對URL ,而是相對的URL ,因此它必須改變與下列SQL查詢:
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com'); 更新wp_posts設置的GUID =取代( GUID的, ' http://www.old-domain.com ' , ' http://www.new-domain.com ' ) ;
If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location.如果您有聯繫的內部博客帖子或網頁與絕對網址,這些鏈接將指向錯誤的地點後,你移動博客的位置。 Use the following SQL commands to fix all internal links to own blog in all WordPress posts and pages:使用下面的SQL命令,以解決所有內部鏈接自己的博客在所有的WordPress員額和頁數:
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com'); 更新wp_posts設置post_content =取代( post_content , ' http://www.old-domain.com ' , ' http://www.new-domain.com ' ) ;
Browse through WordPress blog to check if everything is okay.瀏覽WordPress所博客檢查,如果一切是好的。 You also need to re-login to WP Administration as authentication cookie has now became invalid due to different domain.您還需要重新登錄到可濕性粉劑,政府當局作為身份驗證Cookie ,現在已成為無效的,由於不同的網域。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明 :這是一個機器翻譯網頁是“按原樣”提供的擔保。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原版的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和貢獻,或取得技術的支持和幫助,在 My Digital Life Forums 我的數字生活論壇 . 。
Related Articles相關文章
- StatTraq - Wordpress Plugin for Site Statistic and Traffic Counter stattraq -w ordpress插件網站統計和交通櫃
- Integrate WordPress including Comments with bbPress Forum using bbSync整合WordPress所包括的評論與bbpress論壇使用bbsync
- SEO Friendly Rewrite Method to Move Website URL From Subdirectory to Root Parent Folder徐友好重寫方法動議網址從子目錄,以根父文件夾
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working paginating或分裂的WordPress郵寄或網頁下一頁在WordPress沒有工作
- Technorati Incoming Links Plugin for WordPress來Technorati鏈接插件的WordPress
- How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page如何改變頻率或間隔的WordPress自動保存編輯的職位或網頁
- Disable WordPress 2.3 Core and Plugins Update Check and Notification禁用的WordPress 2.3的核心和插件更新檢查和通知
- WLWManifest Disabler Plugin to Remove XLM Link in WordPress Blog Header wlwmanifest disabler插件,以消除xlm鏈接在WordPress博客標題
- Download Previous or Old Version of WordPress下載前或舊版本的WordPress
- Free Download: Akismet for WordPress Plugin 2.0 to Stop Comment, Trackback and Pingback Spam免費下載: akismet為wordpress插件2.0停止評論,跟踪和pingback垃圾郵件



















August 24th, 2008 07:39 2008年8月24日7時39分
[...] database across, and after a few little changes here and there (wordpress plugins and a few little database changes) all was [...] [ … … ]全國數據庫,並經過幾次小的變化,在這裡和那裡( wordpress插件和幾個小數據庫的變化)是所有[ … … ]
August 17th, 2008 10:38 2008年8月17日10時38分
[...] Once you have uploaded the posts to the new blog, you’ll also want to consider running the following 2 queries as suggested here: [...] [ … … ]一旦你已上載該職位,以新的博客,您還需要考慮運行以下2疑問的建議,在這裡: [ … … ]
August 10th, 2008 05:26 2008年8月10日5時26分
great info偉大的信息
August 6th, 2008 18:00 2008年8月6日18時
[...] SQL codes from mydigitallife.info SHARETHIS.addEntry({ title: “How to move WordPress blog from old domain to new domain with 301 [...] [ … … ]的SQL代碼從mydigitallife.info sharethis.addentry ( (標題: “如何移動的WordPress所博客從舊域向新域與301 [ … … ]
August 3rd, 2008 21:45 2008年8月3日21時45分
YOU TOTALLY SAVE MY LIFE!!!!!!!!你完全保存我的生命!!!!!!!! THANK YOU SO SO SO VERY MUCH!謝謝你,所以,所以十分! Yea!雅!
July 30th, 2008 15:56 2008年7月30日15時56分
Gold information.黃金的信息。
You saved me hours.你救了我小時。
Cheers乾杯
July 22nd, 2008 11:08 2008年7月22日11時08分
[...] [ … … ] http://www.mydigitallife.info/2007/10/01/how-to-move-wordpress-blog-to-new-domain-or-location/ [...] [ … … ]
July 14th, 2008 20:18 2008年7月14日20時18分
[...] I’ve posted this comment to the mydigitallife.info [...] [ … … ]我已經張貼此評論向mydigitallife.info [ … … ]
July 14th, 2008 20:04 2008年7月14日20時04分
Hi folks,喜的鄉親,
I had the same probs, butt I never knew on what it depend’s.我有相同的probs ,對接我從來不知道什麼就取決於它的。
I changed the sites Url in the admin area of my Wordpress-blog, but that was an fault.我改變網站的網址在管理方面,我在WordPress -博客,但是這是一個故障。
So nothing would be shown on the right place.因此,沒有將顯示在正確的位置。
Therefor I needed to change it back, but there is no way to get in the admin area again logically, after I’ve changed the root Url.因此我需要改回,但是沒有出路的,以獲得在管理方面再次在邏輯上,之後,我改變了根的網址。
So I opened my mind to get a solution.因此,我開我心目中得到一個解決辦法。 And just in this Moment it comes over me:和剛剛在這個時候來過我:
…only go on your hosting surface and start PHPmyADMIN and find the following database entry: …只能對您的主機表面,並開始phpmyadmin ,並找到以下數據庫條目:
“Your WP-Blog database”–>wp_options–>make this database Entry editable–>now find the row “site_url”–>and change in the “options_value”column the root of your blog–>safe it and it’s done! “您的可濕性粉劑-博客數據庫” -> “ w p_options” - >使這個數據庫條目編輯“- >現在找到行”s i t e_url“-> ”和變化,在“o p t i ons_value”一欄的根源,您的博客“ - >安全,它和它的做!
greetings, Simon問候,薛岳
July 9th, 2008 13:38 2008年7月9日13時38分
yes there are open是有開放
http://www.demonoid.com/
July 1st, 2008 14:18 2008年7月1日14時18分
Thanks for that.感謝。 When I googled for this topic another blog said , to this you have to backup the entire database, create new db and upload again.當我googled為這個題目另一博客說,這你要備份整個數據庫,創造新的分貝,並重新上載。 I was really tensed, but this was actually completed in seconds…..:)我真的緊張,但是這實際上是在數秒內完成… .. : )
June 26th, 2008 22:20 2008年6月26日22時20分
[...] the first thing to be done was to get hold of all the old posts (though very less in number). [ … … ]的第一件事,向做的是掌握所有舊的職位(雖然非常少的數量) 。 Here google served as a saviour and I got hold of a plugin called ‘wp-migrate‘, which let me export all the posts along [...]這裡的Google充當救世主,我掌握了1插件所謂'可濕性粉劑-遷移' ,這讓我出口的所有職位,沿[ … … ]
June 19th, 2008 03:48 2008年6月19日3時48分
Thanks a lot for this tutorial!感謝了很多本教程! I’ve been wanting to do this for months but never dared because I was afraid of losing all my hard work.我一直在想這樣做了幾個月,但從來不敢,因為我是害怕失去我所有的辛勤工作。 You really saved my day.你真的救了我一天。
June 16th, 2008 08:30 2008年6月16日08:30
Thanks so much for this post.感謝這麼多為這個職位。 It was tremendous help.這是有莫大幫助。 That was so easy to follow and worked perfect.這是那麼容易的後續工作和完善。
June 15th, 2008 05:29 2008年6月15日5時29分
[...] all their sites to the new site. [ … … ]所有他們的網站上,以新的網站。 Some of these sites were wordpress powered.一些這些網站都是在WordPress動力。 Thankfully, I found this article that made the move a [...]值得慶幸的是,我發現此文章,使得動議[ … … ]
June 14th, 2008 02:09 2008年6月14日2時09分
Thanks for this!感謝!
Everything working.一切工作。 Thanks for providing this valuable resource.感謝提供這種寶貴的資源。 Was invaluable for helping move our prototype Wordpress installation from my home server to full on hosting!是寶貴的幫助動議,我們的原型的WordPress安裝從我的家服務器全面對主辦!
June 10th, 2008 00:26 2008年6月10日0時26分
I had no problem running the first query - the site found the home page instead of displaying a 404 error.我沒有問題,運行的第一查詢-該網站發現,主頁而不是顯示4 04錯誤。
But whilst the second query executes (I am told 2 rows are affected) and when I click a link in the new domain site the correct url is shown in the address bar, all I get is a 404 Not found message saying the requested URL is not on the server - what does this suggest, have I lost some files?不過,雖然第二個查詢執行(有人告訴我,二行是受影響的)和當我點擊一個鏈接,在新的網域網站正確的URL顯示在地址欄中,我得到的是1 404未找到的訊息說,所要求的網址不能在服務器上-這是什麼建議,我失去了一些文件?
June 9th, 2008 03:03 2008年6月9日3時03分
I just executed this command through PHPMyAdmin after dealing with 2 days of phantom redirects… turns out all that was wrong is I forgot to change the URL.我只是執行這個命令通過phpmyadmin後,處理2天的幽靈重新導向…原來一切是錯的是我忘記更改網址。 This solved ALL my problems.這解決了我所有的問題。 You have no idea what a godsend this blog was to me.你不知道什麼天賜良機,這博客是給我。 THANK YOU!謝謝您!
June 2nd, 2008 15:34 2008年6月2日15時34分
hi @ all i need plug in for hosting for wp who can help me喜@所有我需要堵塞在主辦,為可濕性粉劑誰可以幫助我