Getting "Fatal error: Allowed memory size..." Message on WordPress Sites


If you get an error on a WordPress site that shows, "Fatal error: Allowed memory size...", you will have to increase the php memory limit.

First, try adding the following piece of code to the wp-config.php file:
define( 'WP_MEMORY_LIMIT', '512M' );

You can change the 512M to something higher if needed.

If this doesn't work, check the memory limit on the cPanel of that account and then on WHM for that php version. Note that changing the php memory limit on WHM will change for all other accounts that are using that php version.

Did you find this article useful?