Last Updated on 24/11/2020 by iwebsitez.com
What is WordPress memory exhausted error?
WordPress is written in PHP, which is a server-side programming language. Web servers are just like any other computer. They need memory to efficiently run multiple applications at the same time. Server administrators allocate memory size to different applications including PHP.
When 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.
Increase PHP memory limit in WordPress
First, you need to edit the wp-config.php file on your WordPress site. It is located in your WordPress site’s root folder, and 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 the 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.
Note: If this solution does not work for you, then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually. This is not a problem with our web hosting, so you don’t need to worry. Siteground is another great web host.
Please see our WordPress maintenance page for care plans.
With thanks for the image to Vecteezy.
Some of our posts contain affiliate links. That means if you buy something after clicking a link we may receive a commission at no extra cost to you. Thank you for supporting our site!
Need a price for a new website instantly
Try our website cost calculator for free and get a price emailed to you.