How to solve the infuriating HTTP error uploading images or videos to WordPress

Here’s how to fix the dreaded HTTP error uploading WordPress images or videos or other accepted file types to the WordPress Media Library.

One of the most frustrating aspects of using the popular WordPress platform is running into this error when attempting to upload media. If you’ve never experienced this, you’re lucky! I run into this problem on ~1% of my image uploads and have wasted a lot of time and energy trying to resolve it.

solve HTTP error uploading WordPress images or videos: a screenshot of a WordPress Insert Media page, showing the dreaded "HTTP error" message
I’m not alone. The two million plus hits returned by a quick Google search for the cause of this problem confirm that this problem is common. There is neither a simple explanation of why it occurs nor a single solution that prevents it from happening.

Here is a summary of some of the “solutions” that have been proposed:

  • Reduce image size
  • Increase PHP memory
  • Disable mod_security
  • Disable plugins
  • Change php.ini and /or .htaccess settings
  • Install a newer version of PHP
  • Disable image optimization
  • Change upload folder permissions

I’m not denying that these approaches work under some circumstances. If you are consistently unable to successfully upload images to the WordPress media library you should probably investigate them. But be prepared for a lot of messing about with no guarantee of success. (At least, that was my experience.)

So, here’s a solution that works. (Note: except for websites hosted at wordpress.com, because plugins cannot be added to such sites.)

How to avoid the HTTP error when uploading images or videos to WordPress

Begin with these three one-time-only steps:

  1. Obtain and set up an FTP program so you can transfer files to your WordPress host. If you didn’t understand that sentence, don’t worry: here’s a beginner’s guide to obtaining an FTP program and using FTP to transfer files to and from your WordPress site.
  2. Install the Add From Server plugin and activate it. If you don’t know how to install a WordPress plugin, consult this clear beginner’s guide.
  3. From your WordPress Dashboard, check Settings > Add From Server. The default settings [User Access Control All users with the ability to upload files] & [Root Directory Do not lock browsing to a specific directory] should be fine for general use.

Upload media to your WordPress library

Once you’ve completed the above steps, you can upload media to your WordPress library as follows:

  1. Run your FTP program and navigate to the appropriate folder to upload your media. There are a couple of possibilities here. For a default WordPress installation, the appropriate folder will be your Uploads folder, i.e. (..[NameOfYourSite]/wp-content/Uploads/).
  2. If, however, you have the WordPress Dashboard Settings > Media option Organize my uploads into month- and year-based folders checked, you will probably want to upload your media into a subfolder of Uploads that has the form [CurrentFourDigitYear/CurrentTwoDigitMonth/], for example ..[NameOfYourSite]/wp-content/Uploads/2017/07/. Note that if this is your first upload for the current month, the folder won’t exist and you’ll need to create it using the FTP program.
  3. Once you’ve found the appropriate server folder, upload your media file to it.
  4. From your WordPress Dashboard, go to Media > Add From Server.
    solve HTTP error uploading WordPress
  5. Use the navigation links at the top of the Add From Server screen to navigate to the same folder you chose in step 1 or 2.solve HTTP error uploading WordPress
  6. Click the checkmark box (or boxes) next to the media you wish to add. Then scroll to the bottom of the page. There’s an option to set the imported date to the current date and time [default] or the file’s creation date and time. I think the default is most appropriate, but feel free to choose the alternative. Click the Import button and voila! Your selection(s) will be added to your WordPress Media Library!

That’s it! Although this description of the process is long, once you’ve set up your FTP program the six subsequent steps above take very little time to complete. I hope this has been helpful, and welcome your comments below!