Home » How to fix WordPress exhausted memory error

How to fix WordPress exhausted memory error

Flop discs staked

For the proper working of WordPress, you have to have enough PHP memory limit on your WordPress without which your website stops working. Imagine a situation opening up your site, and instead of seeing the website, you get a message saying, “Allowed memory size exhausted.” This will result in the white screen with the mentioned message only. To solve the given issue, you have to solve the WordPress exhausted memory error to ensure that your website is working fine. Depending upon your web host and needs, you can increase the size up to 32 MB, 64 MB, 128 MB, and even 256 MB.  

This problem basically revolves around PHP as WordPress works on PHP, and you have to increase the PHP memory limit to make the website working again. 

Try the following steps to get your problem of WordPress exhausted memory solved.

Configure wp-config.php to solve WordPress Exhausted memory error:

Firstly, log in to the hosting control panel and find the file named wp-config.php. Most of the time, this file is located in the root directory. After that, add the following code into that configuration file to increase the PHP limit and to solve the WordPress exhausted memory error.

define( ‘WP_MEMORY_LIMIT’, ‘256M’ ); 

Edit your .htaccess file to increase PHP limit:

Alternatively, add this line to your .htaccess file.

php_value memory_limit 64M

Remember, 64M is just a place holder in this case. Instead, you can put the number up to which you want to increase the limit. 

Read More: How to fix Broken WordPress installation?

Upload you own file to wp-admin:

If you are struggling to change the existing code and do not know much about WordPress, try to solve the exhausted WordPress memory error in the following way. 

  • Open a new notepad document.
  • Copy and paste the following line into the notepad

             memory_limit = 64M  

             (64M is just a placeholder. You can enter the number of your choice here)

  • Save the file as PHP.ini 
  • Finally, upload the file to the wp-admin area. 

 Once you do that, it will overwrite all the existing PHP limit, and you will be able to use WordPress again.

You can paste this code anywhere in the said file, but to avoid any difficulties, try to paste it at the end of the file.

Contacting web host service provider:

If none of the above solutions works, it means that your service provider has restricted your limit, and that is why you are facing this issue of exhausted WordPress limit. Contact your hosting provider and ask them to increase your PHP memory limit for a better WordPress experience.

If you are an expert in WordPress and none of the above technique is working, you can remove any code that seems suspicious to you. However, beginners must not do this as a single wrong step can break the website completely.

Facing the exhausted memory error can be tricky at times, especially when you do not know how to fix that. It can also lead to slow down the loading speed of your website as not enough PHP memory limit will hinder the resources of the website, ultimately making your WordPress experience poor. Let us know in the comment section below which method helped you to solve your issue.

Leave a Reply

Your email address will not be published. Required fields are marked *