As a website owner, there is a lot of data and content you want to store and share on your website. However, the out-of-memory error in WordPress makes your intentions difficult to implement. Therefore, you should fix this problem by increasing the PHP memory limit for your WordPress site.
So, what is a memory exhausted error in WordPress?
As you know, PHP is the programming language used for the server-side of WordPress. For websites to function smoothly, a WordPress host is required. This server needs memory for applications to run efficiently at the same time. Therefore, the administrator of the server will allocate appropriate memory sizes for different applications, including PHP.
Put simply, WordPress has a default PHP memory of less than 64MB. When WordPress code requires more than 64MB of memory, this memory exhausted error will appear.
If you feel anxious because you do not know how to address this trouble, let’s explore this blog today. We will guide you to increase the PHP memory limit in the clearest and most efficient way.
The way to increase PHP memory limit
The first step you need to do is editing the wp-config.php file which is located in the root folder of your WordPress site. Besides that, you need to utilize a file manager in the web hosting control panel or an FTP client.
In the next step, before the line ‘That’s all, stop editing! Happy blogging’, let’s type the following code:
define( 'WP_MEMORY_LIMIT', '256M' );
After finishing, don’t forget to save all your changes as well as upload the wp-config.php file to the server. Now, the PHP memory limit will be increased up to 256MB. In other words, the memory exhausted error won’t appear.
In case this method doesn’t work for your website, let’s check and ask the web hosting provider of your website to allow you to increase the PHP memory.
In a nutshell, the solution to fix memory exhausted error is quite simple. If you have never tried this way, don’t hesitate to explore it because it will be helpful for your website. In addition, don’t forget to share with your friends the solution to help them fix the error quickly and effectively. Furthermore, in case you have any query, let’s leave your comment below so that we can support you as soon as possible. Last but not least, if you are looking for a new theme for your site, why don’t you visit our Free WordPress Themes here?