Fix: Wordpress HTTP Error when Uploading Media

WordPress is a piece of software which has become the most widely used content management system and is used for setting up blogs. It is open source written in PHP. However, quite recently a lot of reports have been coming in of users encountering the error “HTTP error” on their WordPress. This error happens when the user is trying to upload a media file but unable to do so.

HTTP Error in WordPress

What Causes Wordpress HTTP Error when loading Media?

We investigated this particular issue by looking at various user reports and the repair strategies that are commonly used to fix this particular issue on WordPress. As it turns out, there are several different reasons why this particular issue occurs:

  • Browser Problem: Each browser has different settings and services. Some might conflict with the operation of uploading media files on WordPress for some reasons. While others will have no problem completing the task.
  • The setting of Site: Sometimes the size of the image or the default settings for your site can be blocking the uploading of images. Changing some of the code might help to fix it.

Now that you have a basic understanding of the nature of the issue, we will move on towards the methods. These methods worked for different users trying different ones. Try and see which one works for you.

Method 1: Switch the Browsers

It is possible that this error is not related to the website but related to the browser that the user is using. Before you confirm it as the error inside the Wordpress, make sure you check the same situation in a different browser. Mostly the problem that users get is in Google Chrome, so trying Firefox or Safari may work for them. Different browsers will have a different impact on using the Wordpress and uploading images to it.

Method 2: Editing the Theme Function

You can directly do the editing on Wordpress or through using the web hosting control panel. You can find the file in your website theme directory. The file where you need to edit will be “function.php”. To edit the file in WordPress, follow the steps below:

  1. Open your WordPress Dashboard by simply adding wp-admin to your URL, like: will be your URL for your site

    Opening your dashboard on WordPress
  2. Now on your dashboard, go to “Theme Editor” on the left-side panel through Appearance
  3. Then you need to select a theme on top-right “Select theme to edit
  4. Now open “function.php” below theme selection
  5. And add the following lines in it:
    add_filter( 'wp_image_editors', 'change_graphic_lib' );
    function change_graphic_lib($array) {
    return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
    Editing the code in function.php
  6. Now save it and try again uploading the image.

Method 3: Editing the .htaccess

The .htaccess file exists in the root folder of your Wordpress. This file controls requests from one function to another, and act as a gatekeeper for all sort of things. To fix the HTTP error through this file, you need to do the following steps:

  1. Open your root directory through installed WordPress or using a control panel, such as cPanel
  2. Then, open .htaccess in the root folder of your website
    Opening the .htaccess file in the root directory
  3. Add the following code to the .htaccess file:

    This code will limit the Imagic to use single thread when processing the images

  4. Now save it and check by uploading the image again
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

Fix: Wordpress HTTP Error when Uploading Media

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested