WordPress Error : How to Solve Memory Exhausted Error

WordPress is a lightweight content management system (CMS) that allows you to create and manage your own website. It's one of the most popular CMSs available, and it's used by bloggers, small businesses, and even big companies.

When WordPress encounters an error message, it doesn't show you what the error is. It simply displays the "WordPress Error" header with a message that says, “The memory limit for this program was exceeded." This can be quite frustrating since WordPress will not tell you why it happened or how to fix it. Are you looking for solutions to this problem? Here are some tips on how to solve this issue from today.

Are you facing Memory Exhausted Error in WordPress at First time, you are at the right place to solve this issue. Don't Worry about Memory Exhausted Error. If you are not habituate of handling WordPress Errors like Memory exhausted error, 500 Internal Server Error, 404 Error etc then get ready. Being a WordPress user you do have to tackle and pamper it.

WordPress is a free and open-source content management system that enables users to build a beautiful website or blog. As the most popular CMS in the world, WordPress has many benefits such as its high performance and low maintenance. But just like any other software, it can come with bugs that need to be solved. One of them is the Memory Exhausted Error which causes an annoying problem for some users. This article will teach you how to fix this WordPress error so you can keep on blogging!

WordPress Error : How to solve Memory Exhausted Error

A flexible Content Management System like WordPress takes care of a lot of aspects of your website. In such scenario, at times it throws up few of the WordPress errors like “Memory exhausted” for your website.

And that could put in the panic to any new WordPress users. But, it’s very fortunate that he fixes are pretty much simple, even if you are not into the too much into the techie side.

Unfortunately, there are some instances when WordPress won't work properly due to an error. One of these errors is memory exhaustion, which can happen for various reasons including your hosting service or your PHP version. In this article, we're going to talk about how to solve this problem.

Yeah, I really mean, it doesn’t matter at all. Here in this article, we are going to see how to fix memory exhausted error in WordPress, just in a few quick steps only.

WordPress is the most popular blogging and website platform in the world. But, sometimes it does experience errors such as “memory exhausted error”. This can be a confusing and frustrating issue for bloggers who are just trying to share their thoughts with the world. Luckily, this post will show you how to easily solve this issue by following these steps.

Read on, and let’s find out how to solve a WordPress memory exhausted error!


Fix Memory Exhausted Error in WordPress: Method 1

Follow the below few simple steps to get rid of that error to see your awesome WordPress website live back again.

  • Login to your CPanel, to access the files of your website.

To do so, follow the link provided by the hosting provider, or just type yourdomainname/cpanel/


  • Once you could access the Cpanel Dashboard after logging in, Scroll Down to find “File Manager”

Here, you need to access and modify the file named as “wp-config” and to do so,

  • Click on the public_html, there you would be able to see all the website files along with the wp-config file,

Note: wp-config file contains, a lot of sensitive information so you can take your website backup, just being on the safe side, if anything goes wrong mistakenly.


  • Select and right-click on the wp-config file, and select Code Edit, to edit the file.

This will open an Editor with a lot of information on your website. Now, be very cautious here and scroll down to find a line which says “That’s all, stop editing! Happy blogging“.

And once you find it, go ahead and paste the below single line of code, just below it.

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

Note: For, being sure what you should do exactly you can refer to the below image, it should look alike the same


And finally, hit Save Changes Button.

This will increase the WordPress memory to 256mb, which is quite decent and ideal and WordPress could be able to handle all the files swiftly and smoothly doing so. Make sure not to increase the number too much, as it could crash the server.

Note: By default, WordPress comes with the 32mb memory, which needs to be changed for any website sooner or later as the website grows. It completely relies on how the website size.

You can now check your website would be live now without throwing any error.

Alternatively, you can also do the same by modifying php.ini file to get the same result.


How To Fix Memory Exhausted Error in WordPress: Method 2

This is the other method of increasing the PHP Memory Limit to get off from the error.

  • Once you could access the files, navigate to public_html or wp-admin, look for a file named as php.ini or php5.ini.

If this is the first time your WordPress files are getting edited, in that case, it’s possible you won’t be able to find any of those. In such scenario, you need to create one.

All you have to do is creating a file naming php.ini

  • Take a notepad locally in your Machine, enter the below code in it.

memory_limit = 512M

  • And save the file named as php.ini and upload the same public_html or wp-admin folder.

And you are done and will get rid of the error.

Note: The number mentioned in the memory limit as 512mb can be increased or decrease depending on the overall website site. You can also start with 256 MB, to see if the error gets fixed, if not go ahead and increase.


Both the above methods work great and solved the issue and fix the fatal error: memory exhausted completely. Though, I would recommend trying the wp_config method first.

Do share us which one worked for you in the comment section below.

Post a Comment

0 Comments