How to fix wordpress Memory Exhausted Error – increase PHP memory?

The memory limit is the maximum amount of memory the process can use. If you exceed it, the process fails and Apache reports an HTTP 500 error. By default, Memory Limit in WordPress is 64M. This error occurs sometimes when you try to upload or install plugins, themes that require more memory than the default allocated memory. The Solution of memory exhausted error is to increase your PHP memory limit. 

 

Using wp-confg.php

  1. Dashboard > plugins > Add New > Search
  2. Install & Activate File Manager plugin.
  3. Dashboard > Wp File Manager > Edit wp-confg.php in the root directory.
  4. Right click on wp-confg.php, than click on the code editor.
  5. Add the following code before /* That’s all, stop editing! Happy blogging. */:

    Click Save & Close to apply new memory limit size.

Using shared hosting then you have to

  1. Go to: cPanel > Software > Select PHP version
  2. click on Switch to PHP version
  3. Edit memory limit setting and change it to 256M from the drop-down
  4. Click Save to apply new memory limit size.