Fix: WordPress Memory Exhausted Error – Increase PHP Memory
Are you getting an allowed memory size exhausted error in WordPress?
If yes, then you are at the right place.
It is one of the most common WordPress errors, you can get rid of it with ease. You need to increase php memory limit in WordPress to solve the issue.
In this post, I shall show you how to fix WordPress memory exhausted error by increasing PHP memory.
What is WordPress Memory Exhausted Error?
WordPress is composed in PHP that is a server side programming language. Every site requires a WordPress hosting server for it to make it functional.
Web servers are similar to other computers. They require memory to run multiple apps at the same time in a smooth way. Server administrators allot specific memory size to different apps including PHP.
When your WordPress code needs more memory than the default alloted memory, you will see an error.
WordPress automatically tries to increase PHP memory limit if is less than 64 MB by default. However, it is not sufficient enough.
After above discussion, let’s see how to increase PHP memory limit in WordPress to fix memory exhausted error.
Increase PHP Memory Limit in WordPress
First of all, you need to edit your wp-config.php file on your WordPress website. The location of this file is in the root folder of WordPress website and you need to use FTP client or file manager in the control panel of your web hosting.
Next, you need to paste the coding in wp-config.php file before the line that states
This code will enable WordPress to increase the memory limit of PHP to 256MB. After completing it, you need to save the changes and upload your wp-config.php file back to your server.
Visit the WordPress site now and memory exhausted error should be resolved or disappear now.
Note: If this solution is not working for you, it means your web hosting provider does not enable WordPress to increase the memory limit of PHP. You need to ask the web hosting provider to increase the limit of your PHP memory manually.
That is it. I hope that you liked this post on how to fix WordPress memory exhausted error – increase PHP memory. And it will enable you to increase the PHP memory limit. You may want to see our guide on how to fix 404 error in WordPress.
Arsalan Rauf is an entrepreneur, freelancer, creative writer, and also a fountainhead of Green Hat Expert. Additionally, he is also an eminent researcher of Blogging, SEO, Internet Marketing, Social Media, premium accounts tips and tricks, etc.