WP Memory Limit

wordPress 提示 WP Memory Limit问题
修改文件 [wp-includes] - > [default-constants.php]文件

第40行开始:
// Define memory limits.
if ( ! defined( ‘WP_MEMORY_LIMIT’ ) ) {
if ( false === wp_is_ini_value_changeable( ‘memory_limit’ ) ) {
define( ‘WP_MEMORY_LIMIT’, $current_limit );
} elseif ( is_multisite() ) {
define( ‘WP_MEMORY_LIMIT’, ‘256MM’ );
} else {
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
}
}

if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
	if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
		define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
	} elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
		define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
	} else {
		define( 'WP_MAX_MEMORY_LIMIT', '256M' );
	}
}

修改相应的数值[256M]即可
加微信了解更多…
在这里插入图片描述

发布了25 篇原创文章 · 获赞 4 · 访问量 616

猜你喜欢

转载自blog.csdn.net/happyk213/article/details/103200899
今日推荐