skip to Main Content

Fatal error: Allowed memory size of xxx bytes exhausted

You may get Fatal error: Allowed memory size of 33554432 bytes exhausted Error message when you upload image, theme or plugin. In order to fix this problem, you should try to increase the memory allocated to PHP. You can set the limit to 32MB, 64MB, 128MB or 256MB, depending on whether your hosting provider allows it.

Solution 1: Edit php.ini

If you can edit the php.ini file, you can modify the value of memory_limit.

memory_limit = 64M ;

If the default display is 64M, try 128M.

Solution 2: .htaccess file

Add the following line of code to the .htaccess file.

php_value memory_limit 64M

Solution 3: Edit the wp-config.php file

Add the following code to the wp-config.php file.

Increasing memory allocated to PHP

define('WP_MEMORY_LIMIT', '64M');

Leave a Reply

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

Back To Top