WordPress fatal error message may sometimes occur when you try to upload an image in WordPress. This shows you how to solve this error
Why does the WordPress fatal error message occur?
- You are trying to upload a medium sized image in WordPress
- You receive an alert that says, “Fatal error: Allowed memory size of 33554432 bytes exhausted” when try to upload an image with medium file size.
How you can solve it
The first advised solution for a
when trying to upload an image with WordPress is to try to increase the amount of memory that is allocated to PHP. The amount you will be able to increase it to depends on the limit set by your host. It will either be 32MB, 64MB, 128MB or 256MB.
If you can edit your PHP.inifile, update your memory_limit in PHP.ini as follows:memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
- Try to change 64M to 128M
Add the following script to your wp-config.php file:
- Open up your Notepad
- Insert the following code into Notepad exactly as it appears:
memory_limit = 64M ;
3. Save as “PHP.ini”
4. Upload this file to “wp-admin” directory
5. Try to re-upload the image.
Most likely, you would no longer see the WordPress fatal error message. You’re done!