今天在安装孝感SEO模版的时候出现了一下问题:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/lifuchen/public_html/wp-includes/category-template.php(645) : runtime-created function on line

在网上搜索解决办法时,发现都是让修改wp-settings.php,实际上这个方法已经失效了,已经不适用wordpress3.0.1以后的版本了。

正确的解决方法如下:

修改->根目录/wp-includes/default-constants.php

将如下代码:

// set memory limits
if ( !defined(‘WP_MEMORY_LIMIT’) ) {
if( is_multisite() ) {
define(‘WP_MEMORY_LIMIT’, ‘64M‘);
} else {
define(‘WP_MEMORY_LIMIT’, ‘32M‘);
}
}

修改为:

// set memory limits
if ( !defined(‘WP_MEMORY_LIMIT’) ) {
if( is_multisite() ) {
define(‘WP_MEMORY_LIMIT’, ‘128M‘);
} else {
define(‘WP_MEMORY_LIMIT’, ‘64M‘);
}
}

#红字是要修改的地方,内存占用的多了,说明wordpress长大了。

 

本篇文章 wordpress Fatal errormemory size of 33554432 bytes 孝感SEO 发表于 2011 七月 12 星期二 时间 07:07:21 希望您能喜欢这篇文章,★孝感SEO★会坚持写更好的文章,同时感谢您对★孝感SEO★的关注与支持!
本文链接:http://www.seowg.com/13.html → 转载请注明文章出自孝感SEO