从抓虾的Feed之一看到WordPress更新到2.8了,据说改进了700+的小错误,就决定将blog升级到2.8。不过按照系统提供的自动升级功能,却遇到了“Fatal error: Allowed memory size of 33554432 bytes exhausted”错误。我谷歌了一下,在官网上找到了一些线索,具体如下:
Fatal error: Allowed memory size of 33554432 bytes exhausted If deactivating plugins doesn’t work try one of these methods for increasing the amount of memory a PHP script may consume
1. If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M:
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)2. If you don’t have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 64M3. Try adding this line to your wp-config.php file: Increasing memory allocated to PHP
define('WP_MEMORY_LIMIT', '64M');4. Talk to your host.
我先尝试停用了所有的插件,果然系统能顺利升级到2.8,但是之后却不能激活插件。于是我修改了wp-config.php,这次所有的问题都解决了。至于2.8有什么好处,我慢慢体会吧。
另外还有一些比较简单的方法也可以尝试一下:
方法一:
1、打开网站文件wp-settings.php,找到下面这段代码
2、将WP_MEMORY_LIMIT的值改为64M或128M
方法二:
如果你主机控制面板是cpanel,可以使用下面这个方法
1、在cpanel面板选择php Config,选择PHP5(Single php.ini) 单击保存
2、进入File Manager,进入public_html,找到php.ini,修改 memory_limit = 32M 为 memory_limit = 128M