WordPress: Fatal Error – Out of Memory

Beginning on Sunday, images files could no longer be uploaded via the WordPress dashboard into the media library.  An error message similar to this would be displayed:

Fatal Error: Out of memory (allocated 23068672) (tried to allocate 900 bytes) in /homepages/9/d97541224/htdocs/dave.spalla.com/wp-includes/media.php on line 1288

Wordpress Error Message when uploading an image file.

WordPress Error Message when uploading an image file.

A quick google search shows that a lot of people have experienced this issue, many complaints about 1and1’s shared hosting, and various fixes that have a mixed amount of success.

This blog is running the latest version of WordPress hosted by 1and1.  As a long time customer of 1and1, there have been no issues with the service; uptime and reliability have been outstanding.  Now it’s time to test the technical support.  It took a couple calls to support (866-991-2631), but the issue was resolved:

Here’s what the phone support tech said to do:  create a php.ini (using a text editor such as notepad), add the following lines:

upload_max_filesize = 100M
post_max_size = 80M
memory_limit = 80M

Save and upload to the wp-admin folder (upload using either FTP or the WebspaceExplorer located within the 1and1 control panel).

When uploading images, the previous limit displayed was 8MB.  After this change the limit will show 80MB.

Hopefully someone will find this useful.

Comments please!

This site uses Akismet to reduce spam. Learn how your comment data is processed.