How to fix the HTTP error when uploading images to WordPress
parallax background

How to fix the HTTP error when uploading images to WordPress

The best software websites to inspire yourself from
March 11, 2019
Website vs Blog: What’s the Difference and Which One to Use
May 7, 2019
The best software websites to inspire yourself from
March 11, 2019
Website vs Blog: What’s the Difference and Which One to Use
May 7, 2019
 

When we work online, we can expect a variety of errors and problems that can turn out to be a real headache. We know all about that! From connectivity problems to deadly errors that can block everything, you better learn all the WordPress hacks.

One of the most common is the WordPress HTTP error that can occur when you upload photos to your website. We built this guide to offer you solutions for it.

This HTTP Error shows up when you try to upload an image to WordPress and it’s causing trouble for too long. Sometimes the image is uploaded anyway, even after you receive the error message. There are some reasons for that to happen.

In most cases, this WordPress error has origin on the image pixel size, for being too big. For that reason, the server will not host it. Or there’s not wrong with your image size and the server is just picking on you.

This is a simple error that can get on your nerves when you’re focused working. But don’t worry; simple problem, simple solution. It can be very frustrating, after an hour picking the perfect photo and then getting that annoying alert to cut your enthusiasm.

What is exactly the WordPress HTTP error?

 

Maybe you will notice that these errors come up more frequently after you updated your WordPress to the most recent version. It’s even possible that the responsible is your server because of recent updates. With that not being enough, this error can happen due to some plugins or scripts.

If you learn a good system to handle this error, no matter the cause, you can solve your WordPress HTTP error with ease. Forget about those worries. There’s always something about to happen in the big web, just keep calm: You can fix everything.

We will give you the best solutions for your HTTP error when uploading images to WordPress. As a bonus, these solutions are also applicable to videos, PDF files, or another file format accepted by WordPress.

Your solutions to solve the WordPress HTTP error

Turn your plugins off

 

First step: All the plugins you added to your current theme have to be deactivated. Plugins with an unknown or unverified source are most likely the cause. Plugins that needed updates for some time can also trigger the error. If you have plugins to optimize images, in particular, they must be the guilty ones.

Be sure to get your plugins from reliable sources. Yes, there are countless free plugins that even offer to make you a coffee. To be fair they do some of the things they publicize, but then they start to pick up a fight with other plugins and your site. And the WordPress HTTP error is born.

When looking for new plugins, always look for the official WordPress library. You can find it in wordpress.org plugins. All the plugins are tested previously. Checking the reviews is also a good idea. That way you will know how the plugin actually works, and if there’s a chance of having a problem with it.

Permissions in the right way

 

The size of your image can be the source of the problem. To avoid the HTTP error when uploading images to WordPress, be sure your image is not too big. The error won’t be specific to why it’s occurring, so you’ll have to resize (to a smaller version), and try to upload the image again. This can be extremely frustrating, but easy to fix.

For example, if you try to upload an image with 4000x3000 it’s very likely to happen a WordPress HTTP error. The server simply won’t accept it. So then again, you should resize your image to a smaller size to be accepted.

Resize your image

 

When your image is too big (meaning a high number of pixels), resizing it should solve the problem. The minimum pixel size depends on many things, so, to give it a first try, resize your image to something small like 300x200. If this solves your problem, great! From then you can make a number of tries to reach the perfect quality size that doesn’t trigger the error.

You can easily do this with Paint if you are a Windows user:

  • Open the desired image on paint.
  • Select Resize.
  • Click on the Pixels radio button.
  • On the horizontal and vertical fields, you can change the values.
  • Ok to save your image.

If you are a Mac user you can reduce your image’s pixels by opening the image in Preview and then select Tools > Adjust Size.

Try different Browsers

 

Maybe your WordPress HTTP error has nothing to do your website. Maybe the next suspect is your browser.

Some people reported that this HTTP error appeared when they were using Google Chrome. Don’t get us wrong, it’s an excellent browser, but switching to another one can help you to understand if the error is related to your browser.

Memory limit for your WordPress

 

Another possibility to the WordPress HTTP error is short memory. There are other errors that can occur, one of the most common is 503 service unavailable. To solve this problem, add the next line to your WordPress wp-config.php file:

define ('WP_MEMORY_LIMIT', '256M');

This action will increase your memory limit up to 256MB. However, before doing this, you should check the maximum available memory limit on your server through the PHP information.

Edit your images on GD library

Did you know WordPress comes with two image editors? You can edit images with Imagick or GD Library. The two of them are amazing, however, Imagick has the magic power of draining the existing memory. And when that happens, guess what? The WordPress HTTP error shows up again.

Did you change your theme?

 

You just installed a new theme to your site and the WordPress HTTP error says hello. Is there any link? You bet! To better solve this problem, you must create a backup of all your site and change to a default theme (something like Twenty Seventeen).

If things go smoothly from there, you know the problem has to do with the theme. Try to contact the provider or developer of the theme to get assistance. In this case scenario, the error can occur due to two things: a theme issue, or an incompatibility.

Verify the PHP version

Since WordPress version 3.2, you need at least PHP version 5.2.4 for smooth sailing. If you’re using any previous version, you are actually asking for an HTTP error. When hosts use older versions of PHP, you can try everything and still not be able to upload the image.

So, what can you do? The first step is to verify with your host what PHP version they’re using.

Make sure you clean your cache

 

Even though you solved the problem previously, the error insists on showing up. It can be due to your cache, so you should make sure you clear yours before trying other things.

Have you tried refreshing the page?

 

Simple as that. When the WordPress HTTP error shows up, you can try to simply refresh the page. So simple it hurts. So, what’s the catch? Actually, this is one of the most popular solutions. And this is the reason why:

For any reason, your website lost its connection to WordPress for a short period of time so the process got lost in the middle. This may be caused by the ISP, a little glitch on your WordPress host, among others. Sometimes the simple fact of refreshing the page is enough to solve the problem.

Give the image file a different name

 

Quick and easy, you can always rename your file. When you try to upload a duplicated file, WordPress adds a number in the end. If that doesn’t work, rename it yourself. You can’t rename an image that has already been uploaded, you have to do it locally and upload it again.

The custom media library path

 

If your media library path is not set the right way, it can create the WordPress HTTP error. This commonly happens when someone migrates their local site to production. In your WordPress dashboard, open Settings and then Media. Locate the file path value, delete it, and Save Changes. Your media must be stored in /wp-content/uploads folder.

You don’t have to stress anymore. Your problem doesn’t have one solution, but a lot of them. We hope we helped you find the solution that fits you best, and that by now you’re already thinking about the next media you’ll upload. If you tried everything and the cursed error still doesn’t stop haunting, you should consider either contacting WordPress support services or changing your WordPress host.

If you enjoyed reading this article on how to fix the http error when uploading images to WordPress, you should check out this one about how to fix the WordPress missing a temporary folder.

We also wrote about a few related subjects like WordPress sorry, you are not allowed to access this page, WordPress stuck in maintenance mode, fixing the defer parsing of JavaScript, cannot login to WordPress, WordPress publishing failed and jQuery is not defined.

Related reading: How to Schedule Blog Posts on WordPress

Albert Ślusarczyk
Albert Ślusarczyk
As the co-creator of Be Theme, I am a strong believer in designing with care and patience. I pour my energy, time & knowledge into perfecting the theme for our 260,000+ customers.
Siteground Hosting