Fix for WordPress “Allowed memory size exhausted” fatal error


While trying to upgrade a few WordPress plugins, I got this error message:

Fatal error: Allowed memory size of 33564432 bytes exhausted (tried to allocate 7680 bytes)


After struggling with trying to fix this, I found a really easy solution – increase the WordPress memory allocation size from 32 MB to 64 MB.  To do this, edit your wp-settings.php and change line 13 from:

define('WP_MEMORY_LIMIT', '32M');


define('WP_MEMORY_LIMIT', '64M');

Simple, easy and delicious. No more memory issues for any plugin upgrades!

Another way is to edit php.ini and define the memory_limit there:

memory_limit = 48M