How to increase memory_limit in WordPress?

This problem comes because some plugins need more memory_limit to run in our website and errors seem like –

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

By default memory limit is 32mb. Best way to increase this limit is by using wp-config. This is one of the shortest and best way to do it.

  1. Open wp-config in the editor which is placed on your root folder.
  2. Find this line –
    /* That’s all, stop editing! Happy blogging. */
  3. Paste this line below it.
    define(‘WP_MEMORY_LIMIT’, ’64M’);

This will make a memory limit to 64mb. If you need more than this then you can change it 128M or 256M depends on your requirement.

1 comment

  1. InstaFollowFast.com

    The default memory limit for WordPress is 32MB, but it’s common to have to increase it. WooCommerce’s recommended PHP memory limit for WordPress is 64MB, for example.

Leave a Reply

Your email address will not be published. Required fields are marked *

× How can I help you?