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

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!

  • 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/

  • Drew Kondo

    Not so foolproof. I got errors when using Add from Server.

    • Can you be more specific about your errors? Are you normally able to upload an image successfully? [If not, see my answer to Andre van der Merwe below.] What kind of errors did you get? Were you adding multiple files, or just one?

  • Tony Powell

    Worked perfect

  • You are awesome, sir. Thank you!

  • Ms_Twisted_N_Turned

    Thank you so very much! I truly appreciate this fix.

  • John Cornellier

    I tried this after getting HTTP Error. Here’s what I see:
    0. installed the plugin
    1. put the file with ftp on server
    2. Do “Add from Server”
    3. the page waits for a while, then just refreshed blank, no confirmation
    4. the image is listed in Media Library, but with no preview
    5. looking at the FTP listing, the file is on the uploads directory, but no “supporting” files have been generated (foo-1024×768.jpg) etc.
    6. Adding the file to a gallery silently fails.

    • I’m sorry this didn’t work for you. You must be frustrated. Does this happen for all images or just one specific one?

  • I have one suggestion that might help. Try converting the problem image to a different format. e.g. from .png to .jpg or vice versa, and then repeating the upload attempt. This has occasionally solved the problem for me in the past.

    I am surprised, though, that the process described in this post didn’t work for you, since it has always (to date!) handled such annoying upload problems for me.

    I agree with you that the occasional failure of the WordPress media upload for no obvious reason is extremely irritating, and anyone who can fix this in the core source code would deserve countless thanks.