How to fix WordPress Memory Exhausted Error?

 

Anyone working with WordPress may face with allowed memory size exhausted error in WordPress.

 

In this article, we will show you how to fix WordPress memory exhausted error by increasing PHP memory.

 

 

What is WordPress Memory Exhausted Error?

 

 

Just like any other computer also web servers need memory to efficiently run multiple applications at the same time. Server administrators allocate specific memory size to different applications including PHP.

When your WordPress code requires more memory than the default allocated memory, you get to see this error.

 

By default, WordPress automatically tries to increase PHP memory limit if it is less than 64MB. However, 64MB is often not high enough.

 

 

Increasing PHP Memory Limit in WordPress

 

 

First, you need to edit the wp-config.php file on your WordPress site, which is located in your WordPress site’s root folder. You will need to use an FTP client or file manager in your web hosting control panel.

Next, you need to paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’

 

 

 

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

 

 

This code tells WordPress to increase the PHP memory limit to 256MB.

Once you are done, you need to save your changes and upload your wp-config.php file back to your server.

You can now visit your WordPress site and memory exhausted error should disappear now.