Call us +1-231-421-7160

Wordpress memory limits

We often receive clients requests to increase the PHP memory limits  on WordPress instances. The error message they receiving is: “Allowed memory size of xxxxxx bytes exhausted" or the information in the Dashboard:wp memory 1


By default this limit on our platform is set to 512MB. You can verify this by running a simple PHP script. Just create a file info.php in a root directory of your website (if you happen to have the website on CloudAccess the proper directory is: httpdocs) and put there:


You will be able to run it later, by going to: yoursitename.com/info.php and searching the option ‘memory limit’ as it is shown below:wp memory 2

Since version 2.5 WordPress has got new WP_MEMORY_LIMIT variable. So, by default the limit is set to 40MB (and 64MB when it comes to multisite).
This limit is coded in a file: default-constants.php in a wp-includes directory.

In most cases you don’t want to worry about it, however, it happens sometimes, that WordPress plugins disregard memory_limit set on our platform and blindly take WP_MEMORY_LIMIT that is set by wp-includes/default-constants.php (40MB). In this case you would need to do two things:

1) Add these two lines to the top of wp-config.php (a file in the root -httpdocs directory), right after "<?php":
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');

2) Change lines 22-26 of wp-includes/default-constants.php to the following snippet:
if ( is_multisite() ) {
define('WP_MEMORY_LIMIT', '256M');
else {
define('WP_MEMORY_LIMIT', '256M');

If you happen to have this problem and you are our client, we will be more than happy to sort out this problem for you. All you need to do is: submit a support ticket

Joomla! 3.6.1 update issues
See what’s new in your Cloud Control Panel