WordPress error: Fatal error: Allowed memory size of 41943040 bytes exhausted

So upon updating this site the other day i received this error and nothing would load.  I had a good crack at googling and found a way to resolve it.

Either by using FTP/SSH/Cpanel editor, find the wp-config.php file in your site’s home dir and open it to edit.

Scroll down to find this line:

/* That's all, stop editing! Happy blogging. */

And add this line just above it:

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

So it should look like:

* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
define('WP_DEBUG', false);
define( 'WP_MEMORY_LIMIT', '256M' );
/* That's all, stop editing! Happy blogging. */

Save the file and you should be sorted! Happy days!

Leave a Reply