How to Fix : Fatal error Allowed memory size of 33554432 bytes exhausted

 

Fatal error: Allowed memory size of 33554432 bytes exhausted

Fatal error

if you Receive “Fatal error: Allowed memory size of 33554432 bytes exhausted” when try to add new theme or after moving to another host or after installing some plguins this’s very common issue and you can handle it easily

To solve this error, try to increase the memory allocated to PHP. You can set the limit to 32MB, 64MB, 128MB or 256MB. It depends on your host.

Solution 1: Edit PHP.ini

If you’re still allowed to edit your PHP.inifile, update your memory_limit in PHP.ini by modifying the below line

memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

If the line is showing 64M in default, try 128M.

Solution 2: Edit .htaccess file

Add the script below to your .htaccess file.

php_value memory_limit 64M

Solution 3: Edit wp-config.php file

Add the script below to your wp-config.php file

Increasing memory allocated to PHP
define('WP_MEMORY_LIMIT', '64M');

Solution 4: Create a PHP.ini file to wp-admin folder

  1. Open Notepad.
  2. Insert the following code into Notepad.
    memory_limit = 64M ;
  3. Save as “PHP.ini”.
  4. Upload this file to “wp-admin” directory.