Allowed memory size of bytes exhausted in WordPress

Reading Time: 2 minutes

This type of error is sometimes occurring among the 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.

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 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.

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:

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

  Error Establishing A Database Connection

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.

Inquire About Allowed memory size of bytes exhausted in WordPress

Share us all the details you have so we can start working on your WordPress website immediately!