Here is another most common WordPress error “Fatal error: Allowed memory size exhausted“. Most of the time we used to get “Fatal error: Allowed memory size of 33554432 bytes exhausted” when we try to upload an image with medium or large file size.
To solve “Fatal error: Allowed memory size exhausted” you need to increase the memory allocated to php. You could set the restrict to 32MB, 64MB, 128MB or 256MB. It depends on your host. There are many way to fix this WordPress memory size exhausted error.
Edit PHP.ini File
If you have access to your php.ini file in your hosting panel , go and edit php.ini file. Now find the “memory_limit” in your php.ini file. It will like the blow code.
“memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)”
If the memory_limit is 64M in default, try to change it to 128M and save the file . Now go to your WP-Admin and refresh the page , upload new images . The memory size exhausted error will fixed .
Edit wp-config.php file
Add the below codes to your wp-config.php file to solve Fatal error: Allowed memory size exhaustedIncreasing memory allocated to PHP
Edit .htaccess file
Add the below codes to your .htaccess file to solve Fatal error: Allowed memory size exhaustedphp_value memory_limit 64M