Fix WordPress Memory Exhausted Error by Increasing PHP Memory

Does a memory size exhausted error in WordPress keep popping up on your screen? Does it annoy you to the extent that you need to get it fixed immediately? Look no further, we are here to ease your misery, by guiding you to fix WordPress memory exhausted error by increasing PHP memory. Since it’s a very common and frequently occurring error, its solution is quite simple to follow, so let’s waste no time and get started.

What is the reason behind Memory Exhausted Error?

To give you a better insight on this problem, we’ll tell you the basics first. The programming language used to develop WordPress is a server-side PHP. For websites to run smoothly and correctly, a WordPress hosting server is a necessity. In order for a web server to perform functions like running several applications simultaneously, it needs a memory. Particular memory sizes are allotted to various applications by server administrators.

The following error is displayed, when your WordPress default allotted memory runs out:
How to Fix WordPress Memory Exhausted Error by Increasing PHP Memory

It’s in the WordPress default mechanism to try to increase the PHP memory limit, it lies below 64 MB, but sometimes that amount of memory is not enough. So let’s take you through the process of increasing PHP memory limit in WordPress.

How to Increase PHP Memory Limit in WordPress?

Follow these simple steps to increase the PHP memory limit:

  • Open the WordPress website
  • Open the wp-config.php file to edit it (it is present in WordPress site’s root folder)
  • Open this file through ⦁ FTP client or file manager located in the web hosting control panel.
  • Locate the line ‘That’s all, stop editing! Happy blogging.’
  • Just before this above-mentioned line, paste the following code in the wp-config.php file
  • define( 'WP_MEMORY_LIMIT', '256M' );

    The 256M written indicates that the memory limit is increased to 256MB.

  • Save the edited file
  • Upload that file back to your server.
  • Open the WordPress site, and see if the error has resolved itself.
  • Note: If the error doesn’t disappear, then your web hosting service provider hasn’t given you the authority to alter the PHP memory limit. In that case contact your service provider, and ask them to manually change the memory limit on their end.

    We sincerely hope that our solution for WordPress memory exhausted error by increasing PHP memory limit worked for you.


    Software Engineer | Ethical Hacker & Cybersecurity...

    Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.