Fix: WordPress Memory Exhausted Error – Increase PHP Memory

Fatal Error

Fatal error: Allowed memory size of 43554432 bytes exhausted Are you seeing an allowed memory size exhausted error in WordPress? This is one of the most common WordPress errors, and you can easily fix it by increasing the php memory limit in WordPress. In this article, we will show you how to fix WordPress memory exhausted error by increasing PHP memory.

Are you having problems with your WordPress memory limit? One common issue that can plague a WordPress site is the dreaded “PHP Allowed memory size of 26843546 bytes exhausted”. There are many reasons PHP may run out of memory in WordPress, but typically it’s because you’re hitting PHP’s memory limit in your hosting environment. Luckily, you can change WordPress memory limit with a variable in your wp-config.php.

Also Read

fatal error php memory limit wordpress
fatal error php memory limit wordpress

What is WordPress Memory Exhausted Error?

WordPress is written in PHP, which is a server-side programming language. Every website needs a WordPress hosting server for it to function properly.

Web servers are just like any other computer. They need memory to efficiently run multiple applications at the same time. Server administrators allocate specific memory size to different applications including PHP.

Fatal Error Allowed memory size of 43554432 bytes exhausted

When your WordPress code requires more memory than the default allocated memory, you get to see this error.

1Allowed memory size of 43554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx
Memory exhausted error displayed on a WordPress site

By default, WordPress automatically tries to increase PHP memory limit if it is less than 64MB. However, 64MB is often not high enough.

Having said that, let’s see how to easily increase PHP memory limit in WordPress to avoid memory exhausted error.

Increase PHP Memory Limit in WordPress

First you need to edit the wp-config.php file on your WordPress site. It is located in your WordPress site’s root folder, and you will need to use an FTP client or file manager in your web hosting control panel.

Next, you need to paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’

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

This code tells WordPress to increase the PHP memory limit to 256MB.

Once you are done, you need to save your changes and upload your wp-config.php file back to your server.

You can now visit your WordPress site and memory exhausted error should disappear now.

If you are new to WordPress, then take a look at our beginners guide on how to copy and paste code from the web.

We also have a step by step guide on how to find and edit wp-config.php file.

Allowed memory size of 43554432 bytes exhausted

Note: If this solution does not work for you, then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually.

That’s all we hope this article helped you solve WordPress memory exhausted error by increasing PHP memory limit. You may also want to see our step-by-step beginner’s guide to troubleshooting WordPress errors.

Ask Your Host for Help

If you don’t have access to either of these files, then the best option is to contact your hosting provider and ask them to increase the memory limit. Most hosting providers will be happy to do this for you.

It’s also worth mentioning that some hosting providers may have their own control panel where you can adjust the memory limit without having to edit any files. Check with your hosting provider to see if this is an option.

If none of these changes work to change your memory limit in WordPress, you can also reach out to your web host for more help. There could be an issue with the code on your site or something your web host has implemented.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

By admin

Leave a Reply

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