WordPress memory exhausted error

How to fix WordPress memory exhausted error

Looking for a way to fix WordPress memory exhausted errors? This article will show you the easiest way to fix the WordPress memory exhausted error.

WordPress memory exhausted error is one of the most common WordPress errors. If you are a beginner in WordPress, the memory error will make you frustrated, but you can get rid of this error with very easy steps. When your website reaches the limit of PHP memory, this type of error will show up. Increasing the PHP memory limit can solve the issue. So let’s see how to increase the PHP memory limit to fix the WordPress memory exhausted error.

What is a memory-exhausted error?

WordPress is fully based on PHP, which is a server-based language. So you need an active hosting server to run your website. A web server works like a computer that needs memory space to run different applications. To run the application properly, the server will allocate a space for each application. PHP will have their allocated space too.

When the allocated space for PHP is full and your PHP file will need more space, then you can get the error message.

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx

You will see this type of error when your PHP memory limit is reached. By default, the server allocates 64MB for PHP, but if you are adding more functionalities and features to your website, 64MB is not enough for that.

Increase PHP memory limit in WordPress

To increase your PHP memory limit you need to edit the wp-congif.php file on your website. To edit the wp-config.php you need to access the website root file. For this, you have to use an FTP client or your cPanel dashboard.

After getting access to the wpconfig.php file, just add this little code snippet at the end of the file before the stop editing text.

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

This little code in your wp-congif.php will tell your server to increase the memory limit to 256MB. When you are done editing, save the file and upload it to the server. 

Now check your website and the problem should be solved.

If the problem still exists then you need to contact your hosting provider. Your hosting provider will not allow you to increase the PHP memory limit. So contact them and they will increase your website PHP memory limit.

Wrapping up 

Following the process, you will be able to fix the WordPress memory-exhausted errors in your website. You can see our other tutorials to learn How to fix 500 internal server errors in WordPress.

How to fix common image issues in WordPress

How to fix white text and missing button errors in the WordPress visual editor.

We hope this article will help you. If you liked this article, please like our Facebook page to stay connected.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *