Home > 网站建设 > WordPress博客网址的重定位

WordPress博客网址的重定位

December 1st, 2009

当你改变了你的博客网址后,发现原来的博客就无法访问了,怎么办呢? 会者不难。

例如,原来的网址 technology.thinkedge.com 现在改成了 tech.thinkedge.com后,发现这个博客就无法访问了。
强烈建议采用WordPress的官方网站的权威解答
http://codex.wordpress.org/Changing_The_Site_URL

这个问题涉及到两个方面:改数据库和改博客主题(theme)。

做起来很简单,改两个文件

在wp-config.php中增加两行:

define(’WP_HOME’,'http://tech.thinkedge.cn/’);
define(’WP_SITEURL’,'http://tech.thinkedge.cn/’);

在你使用的当前博客主题的function.php增加下面两行,紧跟着

update_option(’siteurl’,'http://tech.thinkedge.cn/’);
update_option(’home’,'http://tech.thinkedge.cn/’);

就这么简单? YES. 试试就知道喽

thinkedge 网站建设

  1. No comments yet.
  1. No trackbacks yet.