Do you want to learn how to Fix the WordPress Memory Exhausted Error by Increase PHP Memory

Are you getting a WordPress error that says “Allowed Memory Size Exhausted”? This is one of the most common WordPress issues, and it’s simple to remedy by increasing WordPress’s php memory limit. In this article, we’ll teach you how to increase PHP memory to fix the WordPress memory exhausted problem.


Fix: WordPress Memory Exhausted Error – Increase PHP Memory

What is the meaning of the WordPress Memory Exhausted Error?

PHP is a server-side programming language, and WordPress is written in it. For a website to work effectively, it requires a WordPress hosting server.


Web servers operate in the same way as any other computer. They require memory to execute numerous apps efficiently at the same time. Varied applications, including PHP, are allotted different amounts of memory by server administrators.

This issue appears when your WordPress code uses more memory than the default allocated RAM.

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

Memory exhausted error displayed on a WordPress site

WordPress will try to increase the PHP memory limit if it is less than 64MB by default. However, 64MB is frequently insufficient.

After that, let’s look at how to boost PHP memory limit in WordPress to avoid memory exhaustion.

In WordPress, increase the PHP memory limit.

First you need to edit the wp-config.php file on your WordPress site. It’s in the root folder of your WordPress site, and you’ll need to use an FTP program or your web hosting control panel’s file manager to access it.

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

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


This code tells WordPress that the PHP memory limit should be increased to 256MB.

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

You should now be able to access your WordPress site, and the memory exhausted error should be gone.

If you’re new to WordPress, check out our beginner’s guide to copying and pasting code from the internet.

We also have a step by step guide on how to find and edit wp-config.php file.

Note: If this approach doesn’t work for you, it’s because your web hosting company won’t let you boost the PHP memory limit. You’ll have to explicitly request that your web hosting provider boost your PHP memory limit.

That’s all there is to it; we hope this post assisted you in resolving the WordPress memory exhausted problem by increasing the PHP memory limit. You might also be interested in our step-by-step beginner’s guide to WordPress error troubleshooting.



Leave a Reply