Fatal error: Allowed memory exhausted

Last update: 13 August, 2018

The error:

Fatal error: Allowed memory size of #### bytes exhausted (tried to allocate #### bytes) in /PATH_TO_WORDPRESS/wp-content/PATH_TO_PROBLEM/FILE.php on line ###

This error occurs when your server runs out of memory to complete the task at hand. Increasing the memory allotted or decreasing the number of tasks will fix the issue.

Hint: The plugin or theme causing the error is usually found after the /wp-content/ part of the error.
  • Deactivate and remove plugins you no longer use may free up the right amount of memory needed to complete the tasks at hand.
  • Reduce the number of tasks running at once or temporarily deactivate non-critical plugins.
  • Try adding this line to your wp-config.php file:
    define('WP_MEMORY_LIMIT', '128M');
  • If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M, try 128M:
    memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
  • If you don't have access to PHP.ini try adding this to an .htaccess file:
    php_value memory_limit 128M
  • Contact your webhost for additional assistance with your server's memory.

Was this article helpful? ·