HTTP Error

by | Sep 29, 2017 | Troubleshooting, Website Design

Affiliate Advertising
SiteGround Affiliate Link
A client reported to me that he was experiencing problems uploading files into his photo gallery. He indicated that he was receiving “HTTP Errors” during the upload process. It was also mentioned that the error was inconsistent. Sometimes the files would upload properly, sometimes they would not.

HTTP Error Testing

To verify the HTTP Error, I tested the website by uploading image files using the media library multi-loader interface. Image files of various sizes were used for testing. File size ranged from 100K to 5M. There were errors during the upload process. When either using the drag-and-drop method or the file select method, the files would begin to upload and as soon as the process appeared to reach 100%, the HTTP Error would display.

The images that uploaded normally, the process would complete and a thumbnail of the image would be displayed in the media library. For the images where the upload process failed, the images would be listed in the media library, but the thumbnail would not be of the image. The thumbnail would be a document icon. So it was readily apparent that the upload failed.

What is also interesting is that when uploading multiple image files, some of the images would upload properly and some images would not. There were mixed results in each image upload batch.

With single images and with batch image uploads, upload success was inconsistent. It did appear that smaller files had a better success rate than larger files, but there were failures across all sizes of images.

What is even more interesting is that the files that failed to upload appeared in the upload folder. For this install, uploads are sorted by month.

HTTP Error Diagnosis

To diagnose the source of the HTTP Error, I started with the standard procedures: updated themes, updated plugins, changed themes to a default theme, disabled plugins, etc. The HTTP error continued to present itself on an intermittent basis. None of these procedures were successful.

  • Reinstalled WordPress 4.8.2. No change.
  • Checked hosting configuration. Using latest version of PHP.
  • Checked php.ini file. No issues found

HTTP Error Resolution

Researched various solutions for resolving the HTTP Error. Since this was a standard WordPress install and a very simple installation, the signs pointed me towards a server issue or a server configuration issue. I tested a couple recommended changes with no success. There was either no change or the suggestion caused my WordPress server to fail.

The suggestion that worked was found on the WordPress Trac site.

Added the following code to the functions.php of the theme.

add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );

Source of the resolution is located at

After adding the above code to the functions.php file. I was able to upload files of various sizes without issue. Tested up to 6MB files.

To confirm solution, I remarked the code in the functions.php file and tested uploads again. The HTTP Error returned after the code was remarked.







Zombie Bike Ride in Davis, CA for 2023

Zombie Bike Ride in Davis, CA for 2023

Zombies will again swarm the bike paths of Davis this year for the 4th annual Zombie Bike Ride. Put on your best zombie attire, grab your bike, and head to the Davis Bike Loop for the ride of your life! Literally.

Davis Downtown Gift Card

Davis Downtown Gift Card

Is the new Davis Downtown Gift Card more fun than a basket of kittens? Not sure. We will just have to find out as Davis Downtown has brought back the ever-popular, local business supporting, Davis Downtown gift card…in electronic format.

Stewart Savage Portrait

Stewart Savage is a website designer and photographer with over 25 years of experience. Learn more about Stewart Savage and Abaton Consulting.

Photography services from Stewart Savage Photography

Affiliate Advertising
Like what you are reading?

Like what you are reading?

Subscribe to my email list and have website design and photography tips delivered to your email box. 

You have Successfully Subscribed!

Pin It on Pinterest