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');
		}
	}

随机文章

  1. 没有评论

  1. 没有通告