Coding Agency for Web Development » WordPress Issues » Allowed memory size of bytes exhausted in WordPress

Allowed memory size of bytes exhausted in WordPress

READING TIME: MIN

This type of error is sometimes occurring among WordPress websites and every once in a while a user will face it either on his site or somewhere else. As we all know WordPress back end is built on PHP and the maximum memory usage will also depend on the PHP memory limit.

When does the “Allowed memory size of bytes exhausted” error in WordPress occur?

In this article, we will point out the most probable causes of this issue and also once of the easiest and fastest fixes n the matter.

The error is produced when a script on your site needs more memory than the one it is allowed to use.

The issue often occurs in the following cases and circumstances:

  • When you install a new copy of WordPress
  • When you install a plugin
  • Testing the site after migration
  • When you have too many posts and/or plugins
  • When you are using a “heavy” and resource-consuming theme
  • In the case of a poorly coded plugin
  • When a plugin conflict occurs

One of the easiest fixes, in this case, is to try to increase the allowed memory used.

Resolving the “Allowed memory size of bytes exhausted” error in WordPress

This can be done in a couple of ways:

1) The first that you can try is to add this line the wp-config.php file:

  Reset WordPress Admin Password

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

In this case, you will need to have in mind the max PHP memory limit that is set by your host

2) The second option is to add this line to the php.ini file:

memory_limit = 512M

And again you will have to verify with your hosting company what is the allowed limit for this particular value.

Vipe Team

Author Vipe Team

Our tireless team who creates high-quality WordPress-related content for you 24/7/365.