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喜@所有我需要堵塞在主办,为可湿性粉剂谁可以帮助我