WordPress Memory Limit问题
今天登陆控制面板的时候突然间报错Fatal error: Allowed memory size of 33554432 bytes exhausted,
Google了一下,针对我使用的WordPress 3.2.1版本,修改/wordpress/wp-includes/default-constants.php即可解决。
将如下内容:
function wp_initial_constants( ) {
global $blog_id;
// set memory limits
if ( !defined('WP_MEMORY_LIMIT') ) {
if( is_multisite() ) {
define('WP_MEMORY_LIMIT', '64M');
} else {
define('WP_MEMORY_LIMIT', '32M');
}
}
修改为:
function wp_initial_constants( ) {
global $blog_id;
// set memory limits
if ( !defined('WP_MEMORY_LIMIT') ) {
if( is_multisite() ) {
define('WP_MEMORY_LIMIT', '128M');
} else {
define('WP_MEMORY_LIMIT', '64M');
}
}
随机文章
- 2011 年 11 月 30 日 - Linux下开发测试环境的部署 (0)
- 2011 年 2 月 18 日 - Oracle Linux 6尝鲜 (0)
- 2011 年 4 月 6 日 - naroah和doudou的顾村公园樱花赏 (0)
- 2011 年 3 月 7 日 - 一句SQL解5*5棋盘难题 (2)
- 2010 年 12 月 31 日 - 2011新年开篇 (0)
- 2011 年 1 月 7 日 - 说事 (0)
- 2012 年 1 月 1 日 - 2012,新的一年 (0)
- 2011 年 1 月 28 日 - wmsys.wm_concat函数返回CLOB类型 (0)
没有评论