Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes)

Add the following at the top of wp-config.php:

ini_set('memory_limit','128M');

Although you should use WP_MEMORY_LIMIT when you can, we see in /wp-includes/default-constants.php that WordPress doesn’t do much more than use ini_set itself. Note: This is just one more thing to try, but you’ll likely end up having to have your host fix this issue.

Leave a Comment