WordPress

How to increase WordPress memory limit

Increasing your WordPress memory limit can help address memory limit issues which may occur when using demanding plugins like WooCommerce or if you have a large number of WordPress plugins installed.

By default, WordPress will try and use 40MB of PHP memory and 64MB if configured as a WordPress multisite. These limits are defined at the beginning of /wp-includes/default-constants.php.

Whilst many web hosts limit the amount of PHP memory to as little as 8MB, Ecenica shared hosting plans allow you to increase your WordPress memory to a massive 756MB of PHP memory.

Please follow our steps below to increase your WordPress memory limit;

Steps to Increase PHP Memory Limit in WordPress

  1. Open wp-config.php in your code editor, or in cPanel File Manager
  2. Add the following code before the /* That's all, stop editing! Happy blogging. */
define( 'WP_MEMORY_LIMIT', '96M' );
  1. Change this value up to 256M.
  2. Save your changes

The line of code tells WordPress to increase the PHP memory limit to 256MB. This limit should be sufficient for most WordPress websites however you need more memory, you can increase this value to 768M (768MB), the maximum PHP limit on Ecenica shared hosting accounts which includes our Cloud Hosting and WordPress Hosting plans.

If your WordPress site is hosted on one of our Cloud Servers, or Dedicated Servers you can set the memory as high as you want, however please make sure it does not exceed the RAM allocated to your server.

External links

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London