WordPress is the most popular website building platform on the internet. It occupies a major share in the market. Their coding is mostly done in the PHP programming language. As a result, it can often cause some errors. One such error occurs when a piece of code exceeds the WordPress memory limit.
Usually, a modern website consists of a load of applications. It is done to either increase the website’s functionality or make a user stay longer. Therefore, these applications require some amount of memory to execute.
As a result, users face the WordPress memory exhausted error when the application requires more space than what was allotted. Generally, WordPress allots up to 64 MB for running such applications.
Therefore, the users face the error when an application or scripting code exceeds the 64 MB mark. Usually, memory is equally allocated among the different applications on a website.
Subsequently, you need to increase the WordPress memory limit to resolve this error. It is one of the most common errors faced by WordPress users. It can often be annoying and troublesome to deal with.
Furthermore, this error can cause the dreaded ‘White screen of death’, ‘500 internal error’ and other such errors. These errors can stop the website from functioning normally. Furthermore, your website may not be displayed at all.
You can easily increase the WordPress memory limit by changing a few values of certain files in the website’s root directory.
You need to have an FTP client to access these files. There are many available for free including the ones provided by WordPress themselves. In addition, you can use Windows Explorer as well.
The files that you need to alter are mentioned below.
As a rule, you should always download and make a backup of these files before altering them. They are important and any misconfigurations could result in an error. In addition, these files are created during the installation process.
There are three easy ways to increase WordPress memory limit. All you need to do is add a line of code into the file. Generally, either one of the following changes will do the trick for you.
This is the most basic way to increase WordPress memory limit. Therefore, try this solution before you try the other methods. Follow these steps to increase your allotted memory.
Generally, your WordPress memory limit should be increased using the above solution. However, you can try the following if you’re still facing the exhausted memory error.
Finally, you can follow this solution if the above solutions did not work for you. Here, we will find and change the .htaccess file located in the website’s directory. You can do this by following the steps below.
These methods will increase the WordPress memory from 64 MB to 256 MB. Therefore, you should not WordPress memory exhausted error following these changes. You should copy and paste the backup files in the root directory if you face a critical error.
To summarize, you must be able to increase your WordPress memory limit following the above solutions. Usually, you might still face this issue in certain cases. This occurs when your Web Hosting service provider manually restricts the memory limit.
In this case, you need to contact them to allot you more memory. Similarly, you can find the applications which are taking more space. You can get rid of memory exhausted error by simply removing such applications. However, it is always beneficial to increase your WordPress memory limit. Oftentimes, they do mention it in their plans and you may need to upgrade.