wordpress 博客换域名

换域名之后应该在数据库里,把以前的旧域名更新为新域名,具体操作如下:

在phpmyadmin里运行如下语句:

UPDATE wp_options SET option_value = replace( option_value, 'http://www.meihyun.cn', 'http://bo.moioi.com' ) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace( post_content, 'http://www.meihyun.cn', 'http://bo.moioi.com' ) ;
UPDATE wp_posts SET guid = replace( guid, 'http://www.meihyun.cn', 'http://bo.moioi.com' ) ;

新博客终于搞定,旧的域名已经到期了,索性没有去弄那个301跳转。

参考:wordpress更换域名使用到的sql语句以及301跳转

This entry was posted on 星期一, 十月 19th, 2009 at 8:59 下午 and is filed under Tech. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply