Black Friday50% off every Pro template and membership with code50% off with Ends in 07days21hrs39min53secShop the sale →

How to Increase the PHP Memory Limit in WordPress

Introduction As a website owner, you have a lot of data and content you want to store and share on your website. However, the out-of-memory error in WordPress can get in the way. Therefore, you should fix this problem by…

How to increase PHP memory limit in Wordpress

Introduction

As a website owner, you have a lot of data and content you want to store and share on your website. However, the out-of-memory error in WordPress can get in the way. Therefore, you should fix this problem by increasing the PHP memory limit for your WordPress site.

So, what is a memory exhausted error in WordPress?

As you know, PHP is the programming language used on the server side of WordPress. For a website to function, a WordPress host is required. This server needs memory so that applications can run efficiently at the same time. Therefore, the administrator of the server will allocate appropriate memory sizes for different applications, including PHP.

Put simply, WordPress has a default PHP memory limit of less than 64MB. When WordPress code requires more than 64MB of memory, the memory exhausted error appears.

increase php memory limit

If you feel anxious because you do not know how to solve this problem, read today’s blog. We will guide you to increase the PHP memory limit in the clearest and most efficient way.

How to Increase the PHP Memory Limit

The first step is to edit the wp-config.php file which is located in the root folder of your WordPress site. To do this, you need to use a file manager in the web hosting control panel or an FTP client.

In the next step, before the line ‘That’s all, stop editing! Happy blogging’, type the following code:

define( 'WP_MEMORY_LIMIT', '256M' );

After finishing, don’t forget to save all your changes and upload the wp-config.php file to the server. Now, the PHP memory limit will be increased to 256MB, and the memory exhausted error should no longer appear.

If this method doesn’t work for your website, ask the web hosting provider of your website to allow you to increase the PHP memory.

Conclusion

In a nutshell, the solution to the memory exhausted error is quite simple. If you have never tried it, don’t hesitate to explore it because it will be helpful for your website. In addition, don’t forget to share the solution with your friends to help them fix the error quickly and effectively. Furthermore, if you have any questions, leave a comment below so that we can support you as soon as possible. Last but not least, if you are looking for a new theme for your site, why don’t you visit our Free WordPress Themes here?

Build it with a template

Start from a finished design: Joomla templates, WordPress themes or the AI-ready block themes. Every template has a free version and a live demo.

Stuck on a template?

Pro customers can open a ticket; everyone can read the documentation.

Free download

We'll send the link, setup tips and update notices, and you can reach us anytime through our AI assistant and contact form.

The download starts at once. We email you the link and ask you to confirm your address. Privacy policy.