Allowed Memory Size Exhausted Error Solution for WordPress

Allowed Memory Size Exhausted Error Solution for WordPress

Memory Exhausted Error

A memory exhausted error causes either a white screen of death or the following error :

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/username/public_html/site1/wp-includes/plugin.php on line xxx

Cause

The main cause is when a WordPress plugin or a script exhausts the default memory limit.

Solution

You need to increase your PHP memory limit. Even though we have mentioned all the steps of increasing the memory limit in the first point, I am still writing it here.

To increase the limit, open your wp-config.php file and add the following line of code within the main PHP tags.

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

The above code increases your memory limit to 64M.

Replace your theme with the default theme and disable all plugins

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s