春与秋
春有百花秋有月,夏有凉风冬有雪;若无闲事挂心头,便是人间好时节。
春与秋
当前位置: 首页 > WordPress > 正文

WordPress Memory Limit 内在限制问题解决

登录后台提示: Fatal error: Allowed memory size of  ********* bytes exhausted。

根本进不了后台,根据以前的经验,直接用ftp下载wp-settings.php要来修改.

就是把文件里的 :define(‘WP_MEMORY_LIMIT’, ’32M’)

修改为:    define(‘WP_MEMORY_LIMIT’, ’64M’)

打开文件后并没有发现有这行。。哪去了???

在23行才发现:// Set initial default constants including WP_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.

原来是把这个设置移到 default-constants.php 这个文件了。

下载 根目录/wp-includes/default-constants.php 文件,在23行:

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

修改为:  define(‘WP_MEMORY_LIMIT’, ‘64M’)

保存上传。

 

 

您可能还会对这些文章感兴趣!

WordPress Memory Limit 内在限制问题解决:等您坐沙发呢!

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

gravatar

? razz sad evil ! smile oops grin eek shock ??? cool lol mad twisted roll wink idea arrow neutral cry mrgreen