You are currently viewing How To Fix WordPress Memory Exhausted Error – Increase PHP Memory

How To Fix WordPress Memory Exhausted Error – Increase PHP Memory

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments

If you’re facing the memory size exhaustion problem in your WordPress website, it is not a big problem for your website. It’s one of the most common errors in a WordPress website, and you can fix this error by increasing the PHP memory limit on your site. This article will show you how to fix the WordPress memory exhausted error.

WordPress Memory Exhausted Error Video Tutorial

What is WordPress Memory Exhausted Error?

WordPress software is made with PHP language, and PHP is a server-side programming language. Working properly, a website needs a WordPress Hosting Server to function properly. 

Web servers are like a computer. They need memory for multiple applications at the same time. But server administrators allocate a specific memory size for different applications, including PHP.

When your WordPress code is bigger than the default memory size, this WordPress Memory Exhausted problem happens.

Fatal 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
memory exhausted error

By default, WordPress’s PHP memory limit is less than 64, and the number of PHP memory limits is often not high enough. So let’s come to our part, How to increase the PHP memory limit to avoid memory exhausted errors in the future.

Increase PHP Memory Limit in WordPress

First, you need to edit the wp-config file on your WordPress website. It is located in the website root folders. Firstly open your cPanel and find the file manager. 

And open the File Manager >>public_html >>wp-config.php and just open the file and paste the following code.

define( 'WP_MEMORY_LIMIT', '256M' );

This code will increase your PHP memory size limit to 256MB, or you can use a larger value to increase the size from 256 MB.

Once you do this, then just save the file back to your server.

And now, if you visit your WordPress website, you should see that the problem of exhausted error should be disappearing now.

Note: if the solution doesn’t work with you, then this means that your website hosting provider doesn’t allow you to increase the limit of PHP memory limit. In this case, you’ll need to talk with your hosting provider to increase this manually. 

Hope this tutorial helps you to get out of this problem. Thank you for staying with us.

ideatechy nesletter

Email Subscription

Join 200K+ Subscribers For Exclusive Access To Our Monthly News Letter With Insider Cloud, Hosting Discount, Free Coupon Code, WordPress Tips!

Leave a Reply