How to increase WordPress memory limit? Have you face such issues where websites break down for reaching the memory limit? If this has happened, you may consult with your developer to solve it. However, there’s some easy way to do it by your own, specially it will help you to understand why it happened.
The WordPress PHPs memory limit is a problem many faces. Therefore, it can be beneficial to know how to increase WordPress memory limit.
In this article, we will try to build an understanding of several ways to maximize the memory space in WordPress. But before that, you need to learn about the concept first. Therefore, here is everything you need to know about WordPress, starting from the concept itself and the types to what kind of errors you may face and how to solve them.
WordPress is an important concept for your business or any other website. PHP is a part of WordPress. It is a server-side language. The language works to generate the HTML pages of your site.
Check Our HTML Templates
The language is quite dynamic with various functional sides. Some of its works include performing calculations, processing queries related to WordPress, and many other functions. The memory space is the most important aspect of a fully functional PHP WordPress.
Every WordPress has a memory limit. The PHP memory limit of WordPress is from 32MB to 64MB. If you have a single site running, the WordPress limit will be somewhere around 40MB. After crossing the limit, the fatal error message will be seen on the site.
On the other hand, having multisite working together will increase the wp memory limit to a maximum of 64MB. As a result, the optimum required memory is often said to be 128MB.
However, you may end up needing more space if the plugin requires it. So that, You can easily check the memory usage after activating the server IP and the display plugin of the memory usage.
Increasing the limit on WordPress can be a quick adjustment to any sort of error you may face. However, you must be careful not to get too much space as it can make your site inefficient.
One major reason why you would need more space on WordPress is that you require more space to upload the contents of your site. Sometimes, running the plugin with an old version can make the site inefficient and slow. As a result, you may need to increase the space to upgrade the version to enhance the performance.
You can find two types of memory limits in WordPress. These are the administrative and the public memory limit.
The administrative memory limit is the limit for admin pages. Similarly, this is generally the owner page of the website. As admins or owners of a webpage, you are entitled to a limited amount of space to code the contents of the page. This space limitation is called the administrative memory limit.
The public page of the website is simply the landing and other pages available for the public users. The hosting server again allows limited space for public pages. The limited space is called the public memory limit.
At any point in your function, you will definitely need to increase the WordPress memory limit. This is true to increase the Administrative Memory Limit as well as to increase Public Memory Limit. There are 3 different ways in which you can do this.
The wp-config.PHP file contains the details of the base configurations of your site. This is the root of the file directory of your WordPress.
At first, you will need to search this line: define(‘WP_MEMORY_LIMIT’, ’32M’);. After finding this line, you will need to modify the last number and increase it. Now, that last number is basically the space limit. Therefore, you should increase it to 128M at least. In the end, the line should look like this: define(‘WP_MEMORY_LIMIT’, ‘128M’);.
When you are done increasing the memory limit, you should remember to save it. You can still increase the memory if you need to in the future. However, you should not overdo anything as that can crash the server.
This is the method when the first method does not work. Sometimes, you may not be able to fix the PHP increase memory limit problem just by increasing the WordPress memory. In such circumstances, you will have to go to the server settings. However, you must not be using a shared server for this process to work.
If the server you are using is private, you can find the PHP.ini file in the root folder. Once you find it, you should make the following changes:
You should input the value that suits your interest as well as solves the memory limit error. Moreover, you must clear the cache to check whether the changes solved the issue or not.
This is the last option you can use. This is your last resort when the previous method does not work. The dot in front of the file name suggests that it is hidden. As a result, you will find it in the SFTP manager if you do not find it in the root folder.
However, increasing the memory limit with this process is much easier. All you have to do is add a few commands in the .htaccess file. These commands are as follows:
Your website will require enough data to store all the contents. Whenever there is a shortage of available space, the memory limit error will show up. It is just as simple as that.
However, the question is why the memory would run out if it is finishing up unexpectedly. Just like any other website, your website should go through updates and upgrades with time. Similarly, this will cause newer plugins and scripts to be stored on the server. With all the new contents, the available space will keep on clustering every day. Eventually, you will see the WordPress memory limit to be filled up and show an error message.
You can easily check the current memory space of your WordPress. This can be checked in the Site Health Tool. At first, go to the WordPress dashboard. Then, there you will see “Tools”. Click on it, and you will find the “Site Health” option. Inside this option, you will see “Info”. Click on it and check the server section. There you can see the PHP Memory Limit.
There are 3 methods to increase WordPress memory limit. You can choose any one of them to increase the PHP storage limit of WordPress. We have discussed all methods in the above article.
The default memory limit for WordPress is 32MB. Sometimes, it can be up to 64MB, which could be rare. For most cases, it is around the 32MB default space.
You can check the WordPress memory limit in the Site Health Tool option. You can find the Site Health Tool in the “Tools” option.
The optimum PHP memory limit should be 256M. However, some websites may require even more space to keep the data stored.
You can easily change the memory limit by logging into the cPanel. However, after logging in, go to the Software option. You will find the PHP Version option there and then locate the Memory Limit section. Accordingly, you can change the memory by clicking on the Value.
You can find the PHP INI in the wp-admin directory. Surely, it should be there by default. If not, you can always create and define a new one.
WordPress is a significant platform to conduct a business online. Just like any other storage facility, the space in WordPress will be limited for you to work with. Therefore, it is highly advantageous to know how to increase WordPress memory limit. The 3 methods mentioned are the most effective ones. You should at first figure out which one works best for you.