Updated on Jul 8, 2019
If you see an “allowed memory size exhausted” error in WordPress, you should know that it's one of the most commonly seen WordPress errors. Not to worry, you can quickly fix it by increasing the PHP memory limit. We will give you a hand with resolving the problem.
In this post, you will find:
WordPress is written in PHP, which is a server-side programming language. Every website needs a WordPress hosting server for it to function correctly. Web servers are actually like any other computer. They need to have the memory to run multiple applications efficiently at the same time. Server administrators allocate specific memory size to different applications, including PHP.
When your WordPress code requires more memory than the default allocated memory, you get this error:
Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx
By default, WordPress will automatically try to increase the PHP memory limit if it's less than 64MB. However, 64MB often is not nearly enough. With that said, let us see how to address the PHP memory limit in WordPress to avoid the memory exhausted error.
There are three ways to address the memory limit:
memory_limit
and upload_max_filesize
values, you need to access your cPanel account first;memory_limit
and upload_max_filesize
values to the ones you need for your application;define ('WP_MEMORY_LIMIT', '64M');
memory_limit = 64M;
Notice that in both of the examples, we have used 64 MB as value for the memory limit. However, you should set the value that the theme/plugin requires. Also, those changes can be performed via the cPanel or the FTP service.
In case you tried both ways, and they don't work, or if you simply don't have the time to address the issue on your own, feel free to submit a ticket via your Client Area with us. If you are not yet our client, you can check our WordPress Hosting packages so you can enjoy the improved speed, advanced security, and expert technical support services it offers.
We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!