Search
Close this search box.

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

Contents

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. */:
    define('WP_MEMORY_LIMIT', '256M');
    define( 'WP_MAX_MEMORY_LIMIT', '256M' );

    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.

 

 

Share :

[social_icons_group id=”13627″]

Leave a Reply

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

Picture of Shania Riaz

Shania Riaz

Shania Riaz is Wordpress Designer at Hfarazm Software. Her expertise includes Wordpress Customization and Bug Fixing. She holds a Software Engineering Degree from The University of Central Punjab, Lahore.