WordPress 3.1+ Fatal error: Allowed memory size of 33554432 bytes exhausted 解决方法

今日发现 WordPress 后台出现若干 Fatal error: Allowed memory size of 33554432 bytes exhausted 错误,遂百度谷歌之,但给出的解决方法大都千篇一律,总结为以下几点:

1. 修改 ./wp-settings.php

过程:将 define(‘WP_MEMORY_LIMIT’, ’32M’); 改为 define(‘WP_MEMORY_LIMIT’, ’64M’);

结果:失败。

2. 修改 ./wp-config.php

过程:在 define (‘WPLANG’, ”); 下行添加 define(‘WP_MEMORY_LIMIT’, ’64M’);

结果:失败。

3. 修改 ./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’); }

结果:失败!

4. 在网站根目录下创建文件 php.ini

过程:在 php.ini 里面添加代码:memory_limit = 64M

结果:失败!!

5. 修改 ./wp-admin/install.php

过程:在

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>