WP乱码的问题

刚刚把扯夫从Godaddy移到Slicehost,搬家的过程中遇到了WP乱码的问题。具体情况是这样的:

我先按照官网《Moving WordPress》的方法在Godaddy用phpMyAdmin把数据库导出,文件里的数据看起来一切正常——该设置成utf8的地方都设置成了utf8,该是中文的也都不是乱码。

在Slicehost这边,我用命令行直接导入数据,导入后的数据库一切正常。准备好wp-config.php,顺利升级到WP2.7。

然而上来一看,看到的却是满屏乱码。我的心也跟着碎了。

看了也试了一些别人的方法,不是要改WP的code就是要折腾MySQL,我觉得太麻烦。最后还是上官网查一查,结果看到这样一段话

Adding DB_CHARSET and DB_COLLATE to the wp-config.php file, for an existing blog, can cause major problems.

好吧,虽然我原来的wp-config.php里其实也有这两项,但还是试试看。

注释掉那两行,保存;回到前台,刷新。

之后发生了什么就不说了。

This entry was posted in 就爱扯. Bookmark the permalink.

One Response to WP乱码的问题

  1. Pingback: 博客搬家,记念一下~ « 我与从 爱跟从 生命志

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>