解决WordPressAllowed memory size of 33554432 bytes exhausted问题
June 15th, 2009 | by Shaka |今天Picksth.com的Wordpress(中文)升级到2.8之后,就频繁的出现Allowed memory size of 33554432 bytes exhausted问题。而同时升级的popocat.com的Wordpress(英文)就没有这个问题。感觉很奇怪。另外还同时出现了另一个奇怪的问题,Picksth.com是中文的Wordpress, 升级之后感觉CMS界面的字体爆大,几乎到了晃眼的程度。
于是就,开始想是不是因为中文的关系。重新上传了WP的文件,把config里的语言设置为英文之后。问题解决!
不过Google了一下,说这个问题可以修改下wp-settings.php文件,这样改:
1. Download, back up and open: wp-settings.php in wordpad/notepad
2. Search for define(’WP_MEMORY_LIMIT’, ‘32M’);
3. Change 32M to 64M : define(’WP_MEMORY_LIMIT’, ‘64M’);
4. Enjoy
wp-settings.php文件每次升级会被替换,因此有人提出了一劳永逸的修改方法(注意这个方法的最后一句话):
1. Create a file called php.ini in the root of your site (if you are using a hosted addon domain, this must be in the subdirectory of that site)
2. In php.ini, enter a line that says
memory_limit = 64MB
3. In your site’s .htaccess (being a WordPress blog, I’m assuming there is one), enter the following line
SetEnv PHPRC /
(keep the slashes)
4. Edit wp-config.php and enter the following line
define(‘WP_MEMORY_LIMIT’, ’64M’);
5. Upload the new files to the server
Oh, and don’t tell your hosting provider you’ve done this…
呵呵,顺便把wp-settings.php文件文件也改了。
不过,还是觉得问题的根本在于WP对中文的兼容性的会使这个问题严重化,显露化。因此,用英文的WP是正解!
标签: Wordpress