Fix: How to solve Memory Exhausted Issue on WordPress websites?

Are you seeing an allowed memory size exhausted error in WordPress? This is one of the most common WordPress errors, and you can easily fix it by increasing the php memory limit in WordPress by adding simple lines of code. In this article, we will show you how you can fix WordPress memory exhausted error by increasing PHP memory.

The memory exhaustion error isn’t as threatening as the previous one since it gives out an error message when it occurs. The memory limit exhaustion is primarily attributed to a particular script or WordPress plugin.

The error that’s displayed looks something like this:

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

Fixing the WordPress Memory Exhausted Error

Fixing the WordPress memory limit issue is simple. All you have to do is increase the memory limit.
To solve this, access your FTP, and try to find the wp-config.php file.

Once you have found the wp-config.php file, all you have to do is open the file in the text editor and just before the “That’s all, stop editing!” statement, copy/paste the following statement:

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

This code increases the WordPress PHP memory limit to 256 MB. Now, save your changes, and you’re good to go!

Drop Your Comments Below