How to increase memory_limit in WordPress?

How to increase Memory Limit

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.

× Chat with me