InMotion Hosting Support Center
Image of the HTTP error message

When working with images in WordPress, it is possible that you get an error when uploading to your site. This error is a rather vague HTTP error. This can leave many people puzzled as to how to fix this. Here we will show you one method to correct the error in your WordPress site.

Correcting the HTTP Upload Error

  1. Log into your cPanel dashboard.
  2. Using the file manager, navigate to your WordPress site's root directory.
  3. Locate and open the .htaccess file for editing.
  4. Add the following line of code at the top of the file:
  5. Save the changes to the .htaccess file.

Now you should be able to upload the image in your WordPress site without issue. If your problems persist, we recommend following our WordPress Troubleshooting guide.

Was this article helpful?
Continued Education in Course WordPress
You are viewing Section 20: How to Fix the HTTP Image Upload Error in WordPress
Section 19: How to Embed Video in WordPress Posts and Pages

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

n/a Points
2019-01-23 2:27 am

Hello sir,

My website is open at and i want to shift it at i solved the canonical issue but still web page is open without www. can you please help me

42,946 Points
2019-01-23 12:40 pm
Please follow the directions in this article on forcing WWW in .htaccess.
n/a Points
2018-11-15 7:46 pm

Worked - thank you!

n/a Points
2018-08-22 1:39 am

for me changing image size to 1380*280 px or below works. 

n/a Points
2018-04-02 6:31 pm

You made it simple! Worked like a charm! Thanks for posting & sharing. 

n/a Points
2018-03-26 10:16 am

It's perfectly work for me. Thank you!!!!

n/a Points
2018-03-22 6:17 am

It didn't work for me

31,595 Points
2018-03-22 10:16 am
I recommend following our WordPress Troubleshooting guide to narrow the cause down further.

Thank you,
n/a Points
2018-03-16 7:26 am

For me i didnt have to edit my htaccess file. after i removed the apostrophe from the file name, it uploaded with no problem. so I guuss its probably some plugin or the core that is not accepting certain characters. Anyways im glad you guys have a solution.

n/a Points
2018-03-28 10:01 am

For me it was a $%*ing apostrophe in the file name, didn't even notice it....

Thanks for the tip!! :D

Problem solved

n/a Points
2018-03-14 3:37 pm

Perfect! Thank you!

any chance you could explain what causes the errror? I tried PSD 6 and PSD CC both gave the error before you fixed it.

42,946 Points
2018-03-14 6:10 pm
As per this post in the support community, there can be a number of reasons for the error. It may vary based on what you have installed or the configuration of your site.
n/a Points
2018-03-02 3:40 pm

Worked for me!  Thanks!!!

3,862 Points
2018-03-02 4:18 pm
You are welcome! We are glad that we could help!
n/a Points
2018-02-11 10:37 am

For you that worry that you have to go do this to retrospectively to sites you already my have, here you can use this:

find . -type f -name ".htaccess" -exec sh -c 'echo SetEnv MAGICK_THREAD_LIMIT 1 >> "$1"' -- {} \;

3,862 Points
2018-02-12 11:17 am
Thanks for your feedback and contribution to the community!
n/a Points
2018-01-20 3:51 am

Thanks!! its works..

n/a Points
2018-01-02 5:19 pm

It works!  Thanks so much...


n/a Points
2017-12-23 7:32 am
Great done its work thx a lot dude i've been searchin a lot but this is awesome
n/a Points
2017-12-12 1:40 pm
Excellent! It worked after clearing the cache.Thanks
n/a Points
2017-12-05 7:38 am
n/a Points
2017-12-01 10:19 am

If you're uploading Word files I found that saving it into an older format version such as 2004 doc worked. 

n/a Points
2017-11-30 5:57 pm

The recommended change didn't work.

I reduced the filesize to something quite small, that didn't work.

I changed the format to .jpg form .png worked immediately.

n/a Points
2018-03-01 5:23 pm

Same here. I got an HTTP error on PNG images, but after I changed them all to JPG, they uploaded in record time.

n/a Points
2017-11-16 11:52 am
Nice post. Tnks.
n/a Points
2017-11-15 7:59 am

i tried it on my wordpress site but still showing HTTP error


what should i do?

42,946 Points
2017-11-15 11:00 am
Make sure that you have cleared your browser cache and re-logged into the administrator dashboard. Also, make sure that the command is at the top of the .htaccess file and that you're in the appropriate .htaccess file (there can be more than one). If you continue to have the error, then you may need to consult with a developer or contact our live support team.
n/a Points
2017-09-21 12:23 am

Hello brother,

This is a great! It's working fine for me.



n/a Points
2017-08-30 11:03 pm

Excellent, this worked very good

n/a Points
2017-06-24 9:19 pm

Awesome, fixed my problem in a snap!

n/a Points
2017-06-13 6:26 pm

Just a quick thanks for this fix. It absolutely worked a dream. I've encountered this problem on a few sites lately and will try this every time. (BTW it was another host's cpanel so it's not just for Inmotion hosted sites).


Cheers :)

n/a Points
2017-06-05 4:59 am

I had been having the same issue and after some troubleshooting, i found wordpress default plugin Akismet and Hello Dolly was responsible. It may not be the same but this might be it in may cases like mine... Hope it helps

n/a Points
2017-09-06 11:23 am

Disabling the plugin Askimet (my Hello Dolly plugin was disabled long before this problem arose) fixed the issue for me. Thank you so much!

n/a Points
2017-11-01 10:18 pm

Thanks, Akismet  is the one to disable in my case

n/a Points
2018-03-16 2:43 pm

Disabling Akismet worked for me as well (I had also added the line at the top of the .htaccess file).

n/a Points
2017-05-20 9:24 am

Tried the edit but to no avail. Am I correct in assuming the fix is peculiar to InMotion Hosting?

43,761 Points
2017-05-22 12:50 pm
No, this is not specific to InMotion. If the above fix does not work, you may want to try the Force Regenerate Thumbnails plugin. That seems to also have success.
n/a Points
2017-03-28 6:10 am

So I was having this problem as well, and that got me here.I had a plugin "WP Smush" installed. Was the first I deactivated, and viola! All images are uploading.... I think you should add "all image compressing/editing plugins should be deactivated first.Regards

2017-03-29 4:55 pm
This fix also applies to a base WordPress installation with no image manipulation plugins. It relates to a core WordPress image function.
n/a Points
2017-02-19 5:24 am

Thank you for sharing this helpful article. This problem was occurring on my site ( After reading your article, I solved it. That's why thank you again!

2,858 Points
2017-02-20 6:10 pm
Rakibul, we're so glad that we were able to help!
n/a Points
2017-02-14 9:50 am

I have found a great solution for you here in this website

2,858 Points
2017-02-14 1:35 pm
Dipesh, thank you very much for sharing! Please keep in mind as well that there may be other causes to this issue beyond the ones discussed in the article here, as well as in your link.
n/a Points
2017-02-07 7:16 pm

Hi. Thanks for the fix. 

But I have to add this code to my .htaccess file everyday....

The next day I get the same error. And I have to add this code again...

What do I have to do to fix this error permanently...


42,946 Points
2017-02-08 11:22 am
Hello Fano,

Sorry for the problem with your .htaccess file. Either your file is being hacked every day or you have a security plugin that is taking the change that you apply out. If you suspect a hack, then make sure that you have replaced your cPanel password and then check to see that you change is staying in place after you have applied it. Make sure to check your security options too, as they may be keeping a specific version of the file in place.

If you have any further questions or comments, please let us know.

Arnel C.
n/a Points
2016-12-02 5:47 pm

I tried this fix numerous times, but it hasn't worked for me.

2,858 Points
2016-12-02 6:35 pm
Neil, I'm sorry to hear that this method was unable to resolve your issue. Unfortunately, as the article mentions this is a vague HTTP error, and the proposed solution listed here is only one possible fix. You may wish to contact your web host's Support if possible, and ask them for account-specific assistance.
n/a Points
2017-01-23 8:24 pm

I eventually found a fix, by changing the PHP version used for sites, from 5.5 to 5.6.Our hosting company default version of PHP is 5.5.x. and they say, if you want to use PHP 5.6.x,  or 7.0.x explicitly, just add one of the following commands to your .htaccess file.PHP 5.5 (Default)  AddHandler application/x-httpd-php55 .phpPHP 5.6 AddHandler application/x-httpd-php56 .phpPHP 7.0AddHandler application/x-httpd-php70 .php

n/a Points
2016-11-30 6:34 pm

I have added the line of code at the top but when I reopen the .htcacces file after saving it's not appearing? 

31,595 Points
2016-12-01 9:42 am
Ensure you have the correct file permissions to modify the .htaccess file.

Thank you,
n/a Points
2016-10-13 3:50 pm

This fix just saved my life! Well, not quite, but almost. I have been dealing with this ridiculous error for the better part of a year. I basically gave myself an ultimatum to either fix this error soon, or I would have to abandon the entire WordPress platform altogether. It has absolutely killed my productivity when composing new posts.

I have tried every kind of fix up until I found your post on, which then led me back here. Here's the WP post:

And when I say I tried everything, I mean EVERYTHING! I literally thought I had tried every fix out there by now. By a miracle I found this. So far so good! I was able to upload seven pictures at once with zero errors. It's probably been more than a year since that last happened. Thank you so much!

And for others that have little experience with this, I literally put the code from step 4 as the very first line in the file. Saved it, and boom. Fixed. FINALLY! Here's to hoping it's a permanent solution!

n/a Points
2016-10-13 4:37 pm

Unfortunately I spoke too soon. Tried this fix on a second WordPress site of mine (that's more important) and I still get the HTTP Error. However, so far it happens less than it used to, so not sure what's going on.

Sigh. I knew it was too good to be true. Back to searching. Maybe I just need to move on from WordPress. They have to know this is a bug by now, it's been years! Yet there is still no permanent fix.

31,595 Points
2016-10-13 4:59 pm
I recommend following our WordPress Troubleshooting guide to narrow down the cause.

If your problems persist, you can try disabling mod security (the steps may differ if you are hosted elsewhere), renaming your .htaccess file, or changing your PHP version .

If you still have issues, you may have to replace your core WordPress files.

Thank you,
n/a Points
2017-01-23 8:49 pm

I've tried it all man. Nothing has worked. I still have a few lessor important sites on WordPress, but I moved my most important site over to Squarespace. Could not be happier. I was a loyal user for years but WordPress has permanently lost me at this point, at least for any site of importance. A seemingly un-fixable error is not ok. 

n/a Points
2016-10-12 7:59 am

Thanks a bunch for this. This certainly helped in fixing the HTTP image error message on my WordPress blog.

n/a Points
2016-10-09 8:15 am

Thank you! This has been driving me nuts recently but this has done the trick.

n/a Points
2016-09-29 2:52 pm

Inmotion should really include it in their instructions they send after a VPS upgrade.

I had the same problem after I upgraded to VPS but I had to wade through a lot of other answers on Google before I found this one.

This worked for me too.

n/a Points
2016-05-28 7:46 am

Hi Scott,

This post helps me solve the problem after upgrade plan from Shared host to VPS.

Just want to inform to everyone that have the same case should try this one.


Weerayut Teja

n/a Points
2016-09-05 5:54 am

I too upgraded from a shared hosting plan to VPS, and ran into the same issue. Adding this line to the top of my .htaccess file fixed it right away. I have about 6 sites, but so far only one has been affected by thius issue. 

n/a Points
2016-05-06 8:01 pm

The above mentioned is already in the htacces file now. But I still have the problem? Any suggestions are welcome.

31,595 Points
2016-05-09 9:36 am
Hello arjan,

Thank you for contacting us. I recommend following our WordPress troubleshooting guide, to narrow down the cause.

Thank you,
n/a Points
2017-05-29 10:58 am

I had the same problem but managed to resolve it using the following method. All of my images had been optimised using Photoshop and saving for Web & Devices. These .jpg images failed to upload. I opened up each image and just did a "save as" which uncompressed the files by quite a margin (150 KB instead of 40-50 KB). They uploaded successfully and at the same time were shrunk considerably back to circa 40-50 KB so all was well. My uneducated guess is the upload fails as the images were already compressed to the maximum. Not had any problems since I discovered that uploading also compressed files. Hope this helps.

2016-04-26 3:43 pm
WordPress addressed the Imagick issue in version 4.5.1
2016-04-26 3:48 pm
And this discussion:
2016-04-27 2:53 am
Reading more into the Imagick bug, the .htaccess fix provided here by InMotion, which I posted to the support forum, was posted directly into the WordPress core bug tracking site: ... while they identified it "might" be a server config issue, they realized it was so widespread and important that WP decided to fix it in the core. Thanks again for providing insight into the issue. Your solution made it to WP core!
2016-04-27 4:55 am
Oops, guess it's going to be in 4.5.2. Not fixed in 4.5.1, but discussed and planned.
13,821 Points
2016-04-27 7:19 am
Thanks for posting a reply! It's always good to hear we helped. We appreciate you.
n/a Points
2017-01-20 9:12 pm

Hey there guys, I know there's already a solution to this problem, but for some reason, I'm getting this issue in WordPress 4.7.1 and your fix is giving me an Internal server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

43,761 Points
2017-01-23 4:21 pm
This is a pretty general error. You will want to contact your hosting support so they can look at your logs for the specific error message and correct it.
2016-04-18 1:14 pm
Are there any plans to make a fix on the server level (as I have a managed VPS) to resolve this error? It's tedious to have to go to the .htaccess of each and every site affected to do this fix.
43,761 Points
2016-04-18 2:21 pm
You can add it to your htaccess template so that all new accounts already have the code in it.
2016-04-20 7:15 am
This doesn't help me update several existing sites already in place... WordPress is so common and widespread now, I would think it would be better to identify what the conflict is and fix it on a global level. Many people (with InMotion or elsewhere) have reported this error... so it's something WordPress did with 4.5; but a theme developer I work with immediately said it was a server conflict. Someone else even guessed this was on CentOS when I described the error. An alternate fix:
43,761 Points
2016-04-20 10:06 am
Hello Zuluintl,
This error is not necessarily something new with WordPress 4.5, it has a history of showing up as far back as 8 years with WordPress. As far as it being a 'server conflict', you are right. The server default environmental settings are not set for any specific software. Sometimes software needs different settings, which is the entire point of an .htaccess file. This way you can make changes as needed on your account without affecting the entire server where the original settings are more commonly used.

The htaccess is a configuration file that allows you to change settings at an account level. If that is something you want to do for your entire server you are free to add it to your template. True, this will not change existing sites, that is something you would need to handle manually.

Other fixes like the one you mention may work. For some people, they do not. There are also plugins that bypass Image magick altogether that some people have had success with.

The one presented here is just another option. It also requires no code modification (which would have to be redone after updates), nor does it require the addition of another plugin. It also seems to have the highest degree of success.

In each case, it either alters the method WordPress uses to handle that variable or sets the variable to a different value.
2016-04-20 6:15 pm
Makes sense. The link I provided ended up not working for someone, so I shared this .htaccess line of code to that WP discussion thread. Thank you for providing one viable solution!
2016-06-28 12:13 pm
Scott - Where do I edit the .htaccess template in my VPS servers?

Because right now I have to add the SetEnv MAGICK_THREAD_LIMIT 1 to every .htaccess file after installing WordPress for new websites.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

75 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!