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

This may be a nightmare for the WordPress beginners.

But not anymore! When do you get “Fatal error: Allowed memory size of xxxx bytes exhausted (tried to allocate xxxx bytes)” in WordPress?

Common scenarios are when installing a theme, plugin etc. Most common scenario is when you are trying to import a theme demo which has a preset must have PHP memory limit. The default WordPress memory limit is 40MB which is not sufficient for most themes and plugins now a days. This is called the “WordPress Memory Exhausted Error” which is a very common error when you come across WordPress management.

Thank God, this is a very easy error to resolve also.

So how to resolve/fix “Fatal error: Allowed memory size of xxxx bytes exhausted (tried to allocate xxxx bytes)” in WordPress?

The solution is very simple, just increase the PHP memory limit of your WordPress installation, that’s all.

But how to do that?

You just need to copy paste this code in your “wp-config.php” file (it can be found in the root folder of your WordPress installation) just before the line that says ‘That’s all, stop editing! Happy blogging.’

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

Please have a look at the above screenshot for better understanding.

In some cases you may not be able to increase that by your own, in that case please contact your hosting company to do that for you.

Hope we were able to help you today.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.