Fix WordPress Memory Exhausted Error #
Do you see an error in the amount of memory allowed in WordPress?
This is one of the most common WordPress errors, and you can fix it easily by increasing the php memory limit in WordPress.
In this article, we will show you how to fix WordPress memory error by increasing PHP memory.
What is a WordPress Exhausted Error Memory? #
WordPress is written in PHP, which is a server-side programming language. Every website needs a WordPress hosting server to function properly.
Web servers are like any other computer as they need memory to run multiple applications efficiently at the same time.
Server administrators allocate a certain memory size for different applications including PHP.
When your WordPress code requires more memory than virtual memory, you will see this error.
By default, WordPress automatically tries to increase the PHP memory limit if it is less than 64MB. However, 64MB is mostly
Not high enough.
Having said that, let’s see how to easily increase PHP memory limits in WordPress to avoid a memory 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 the root folder of your WordPress site, and you will need to use an FTP client or file manager in your web hosting control panel.
1- We log in to the cPanel. Please see the following explanation: #
Explanation of entering the cPanel Activate the ssl certificate of the cPanel
2- We go to the file manager #
Log in to the file manager
3- Next, this code should be pasted into the wp-config.php file before the line that’s it. #
define( 'WP_MEMORY_LIMIT', '256M' );
This code tells WordPress to increase the PHP memory limit to 256MB.
Once done, you need to save your changes and upload the wp-config.php file back to your server.
You can now visit your WordPress site and the exhausted memory should be gone now.
The explanation of fixing the WordPress Memory Exhausted error has been completed