What is WordPress Memory Exhausted Error?
The WordPress is written in the PHP, which is a server-side programming language. Every website needs a WordPress hosting server for it to function properly.
Web servers are just like any other computer. They need the memory to efficiently to run multiple applications at the same time. The Server administrators allocate a specific memory size to different applications including PHP.
By default, the WordPress automatically tries to increase PHP memory limit if it is less than 64MB. However, the 64MB is often not high enough.
Having said that, let’s see how to easily increase PHP memory limit in WordPress to avoid memory exhausted error.
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.’
Code:
define(
'WP_MEMORY_LIMIT'
,
'256M'
);
This code tells WordPress to increase the PHP memory limit to 256MB.
Once you are done the changes, 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.