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

by Adrian Segar

Here’s a foolproof method to fix the dreaded HTTP error seen when attempting to upload images, 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.


I’m not alone. The two million plus hits returned by a quick Google search for the cause of this problem make it abundantly clear that this problem is common, and that there is neither a simple explanation 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, and 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 an HTTP error when uploading media 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.

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. From your WordPress Dashboard, go to Media > Add From Server.
  4. 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.
  5. 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 five steps above take very little time to complete. I hope this has been helpful, and welcome your comments below!

Tags: , , , , , ,

  • Using Add from Server option is not a viable workaround for me. When trying to add images from the server I can only select and import a single image at at time. If multiple images are selected then only the first image is imported into the media library. I noticed today that the file is there but the various sizes of the image have not been created as they normally would in WordPress.

    • Hi Andre, thanks for your feedback!

      First of all, are you seeing the HTTP Error every time you upload images to the WordPress Media Library via the normal WordPress process? If so, you have a problem involving your specific WordPress environment and configuration, and, as I say above “if you are consistently unable to successfully upload images to the WordPress media library” you should explore the solutions proposed around the web. Given your symptoms, I’d suggest trying increasing php memory first.

      The method I describe is for folks who occasionally find one file that triggers the error. Actually, I have no problem importing a few files, and, from the plugin reviews, neither do other users of the plugin. My best guess is that your WordPress environment may have a php time limit or memory limitation that is preventing the plugin from completing a multiple file upload successfully. See this response from the plugin developer to a user who ran into a problem trying to import a large number of files: https://wordpress.org/support/topic/import-large-amount-of-images/

Book covers

Thirty minutes free consulting included with book purchase on this site!

Download five free chapters here!

Where To Buy

Purchase eBook ($11), paperback ($26) or both ($32) at lowest available prices via PayPal on this site. Signing and U.S. shipping included. Paperback versions are also available from online bookstores everywhere.

Twitter LinkedInGoogle+

Subscribe to my posts

Testimonial

That was the best meeting I’ve ever attended!

— Kristi Brasher, Debose-Boyd Lab Manager, University of Texas
Event Pro Update
  • Blog Post Archive

  • Cart

  • Meta