How to Fix the WordPress HTTP Error

Even though we think that WordPress is the best platform for website building, it definitely has its issues. For example, one of the most common is the WordPress HTTP error. This error happens when users are attempting to upload images or videos to the WordPress media library. This error is not hard to fix, but it can interrupt your workflow. We’ll tell you why the WordPress HTTP error happens and 12 ways to go about fixing it. 

wordpress HTTP error

WordPress HTTP Error

The WordPress HTTP error happens when something goes wrong while you are trying to upload images and/or videos with the built-in media library tool. The vague “HTTP error” message doesn’t really help you figure out what’s wrong. That’s because there are a few various reasons for this failure, and WordPress doesn’t know which one caused it and gives you this generic message. 

How to Fix the WordPress HTTP Error 

There are typically two origins for the WordPress HTTP error: either a client-side or user error, (which can be a login session or bad characters in a file name) or a problem or setting on your WordPress host (like a server issue, memory list, third-party plugin, etc.) Here are the steps you can take to go about fixing this error. 

1. Refresh the Page

The first thing to do when you encounter the WordPress HTTP error is refresh the page. While this might sound too easy, it is the most common fix. For some reason, your browser might have lost connection to WordPress briefly and the process didn’t complete. Sometimes, if you refresh the page or try uploading it again, the error resolves itself. 

Or, sometimes after you fresh the page or come back to WordPress from another tab in your browser, you’ll find that WordPress kicked you out. This usually means your WordPress login session expired. Once you logged back in, you got the HTTP error. This means you need to manually refresh the page, and then you should be able to upload the media. 

error uploading photos to wordpress

2. Shrink or Resize the File

The second step to try is editing your image file. This might mean reducing the size of the file or decreasing the width or the height. You can use a third-party image optimization plugin to optimize your images. WordPress supports responsible images, so you can upload high-resolution images. This helps images look crisp on retina displays.

If you are a business or a photographer who needs high-resolution images, it helps to keep your final image size below 100 KB and no more than double the size of your website’s content div width. Or, you might need to play with the PNG and JPG file types. Sometimes, one can be larger than the other. 

You also might need to increase the WordPress maximum upload file size, depending on the configuration of your WordPress host. 

3. Rename the Image File

It can also help to rename the image file. WordPress automatically appends a number on the end if you attempt to upload a duplicate file name, but if that doesn’t work, try renaming your file. However, WordPress doesn’t let you rename the file if you already uploaded it. So, you will need to rename it locally and re-upload it. 

If you are uploading images that already exist, try adding a -1 or -2 on the end. Don’t forget the dash, or Google will read it as one word and that could hurt your SEO. If you really want to play it safe, avoid uploading images with file names that have special characters. 

4. Temporarily Deactivate WordPress Plugins and Themes

If you’re receiving HTTP errors, you might want to try deactivating your plugins or switching your WordPress theme to the default to see if this fixes the error. Or, simply delete your WordPress theme. But if you don’t want to affect your live site, try cloning it to a staging environment. If the HTTP error is still happening, you can try deactivating all your plugins to narrow down the source of the issue. Don’t worry, you don’t lose any data by deactivating a plugin. If you can still access your admin, just go to “Plugins” and select “Deactivate” from the bulk actions menu. Now, you’ve disabled all of your plugins. 

If this fixes the issue, you’ll need to narrow it down to see which plugin caused the problem. Activate them one at a time and try uploading an image again to the media library. When you see the HTTP error come back, you have found the plugin causing the issue. Then, either reach out to the plugin developer for help, or post a support ticket in WordPress. 

5. Ask Your WordPress Host

If you are still getting the WordPress HTTP error, try reaching out to your WordPress host for help. Some of the following steps get pretty advanced, and your host might be able to complete them for you. 

wordpress uploading http error

6. Increase PHP Memory Limit 

Sometimes you receive the WordPress HTTP error because your server doesn’t have the available memory for the background upload process to complete successfully. In order to fix this problem, you will need to increase the amount of memory PHP can use. The recommended amount is 256 MB. 

7. Check Uploads Folder Permissions

Usually you will receive a message from WordPress if there is a folder permissions error, but this might not always happen. If a WordPress site has been hacked or infected with malware, there might be a problem with the permissions. The folder you want is your /wp-content/uploads folder. This is where files are stored when they are uploaded via the media library. According to the WordPress Codex, all directories should be 755 or 750. 

You can see your folder permissions with an FTP client, or you can ask your WordPress host to GREP file permissions on your folders and files to make sure they’re set up correctly. If you manually update the permissions on this folder, check both the “Recurse into subdirectories” option and “Apply to directories only.” 

8. Update to the Latest Version of PHP

WordPress recommends that users use PHP 7.3 or higher. If you are not running on at least this version of PHP, you are below the WordPress developers’ minimum requirements. We recommend running the latest and supported versions of PHP because it offers better website performance and security, and minimizes errors. It might resolve the WordPress HTTP error. 

how to fix the wordpress http error

9. Fix Performance Issues with Imagick and Shared Hosts 

WordPress uses two different PHP modules for image processing. They are GD Library and Imagick (or ImageMagick.) WordPress might use either, depending on what is installed on your server. The only way WordPress hosts can cram so many users on the same machine is by having a lot of resources working behind the scenes. A frequent problem is that there are not enough resources allocated to Imagick. Hosts will limit the ability to use multiple threads, which results in the WordPress HTTP error. 

To fix this problem, add the following code: MAGICK_THREAD_LIMIT 1 to the top of your .htaccess file, which changes the thread limit value to something higher. 

Or, tell WordPress to use the GD library rather than Imagick. 

10. Remove Custom Media Library Path 

It’s possible the WordPress HTTP error is occurring because your media library path isn’t set up correctly. This can happen when users migrate their local development site over to production. Go to “Settings” and then “Media” in your WordPress dashboard. If you see a file path value listed, delete it and then click “Save Changes.” Your media should be stored in the default /wp-content/uploads folder. 

11. Disable mod_security

Mod_security is an open source firewall that can sometimes cause the WordPress HTTP error. It is possible to disable mod_security and see if that resolves the error, either by adding some code to your .htaccess file or in cPanel. 

12. Install the Add from Server Plugin

If none of these troubleshooting steps worked, install the free Add From Server plugin. This will help you go around the error and works as a temporary fix, especially if you are in the middle of posting something urgent. However, keep in mind that this plugin is no longer maintained or supported, so it is not a good longtime solution. 

http error when uploading images in wordpress

Resolve the WordPress HTTP Error

WordPress errors are all too common, like the HTTP error and the 404 error. Hopefully, this article has helped you resolve the WordPress HTTP error. If you still need help with WordPress, contact SEO Design Chicago today! We specialize in WordPress website development and can help you with any errors you encounter. 

FAQs:

  • What is the WordPress HTTP error?
  • What causes the WordPress HTTP error?
  • How do I fix the WordPress HTTP error?
  • How do I change permissions in WordPress?
  • Why am I getting an HTTP error in WordPress when uploading images?

Contact Us Today!


Call Now