WordPress Tips : Problem Allowed Memory Size of … Exhausted

If you are blogger with wordpress platform, one time sure you meet with wordpress error code below :

Fatal error: Allowed memory size of … bytes exhausted (tried to allocate … bytes) in …./xxx.php(…) : runtime-created function on line x

This error may be caused by your wordpress over limit to import a file from your server. May be showed a blank screen or error above. And now how to solve this problem:

At the first, please you following this link WordPress FAQ about Working with WordPress. There 3 ways to solve this memory limit :

  1. Increase the memory limit setting in php.ini (e.g. memory_limit = 64M ;). Many hosts may not allow this.
  2. Increase the memory limit via .htaccess (e.g. php_value memory_limit 64M). Many hosts may not allow this.
  3. Increase the memory limit via wp-config.php (e.g. define('WP_MEMORY_LIMIT', '64MB');)

But, from the 3 ways above, the easy way to do set wordpress memory limit is via wp-config.php. Like me, i just add this script to wp-config.php file the problem is fixed:

ini_set("memory_limit","12M");

2 thoughts on “WordPress Tips : Problem Allowed Memory Size of … Exhausted”

Leave a Comment