InMotion Hosting Support Center

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.

Continued Education in Course WordPress
You are viewing Section 3: How to Fix the HTTP Image Upload Error in WordPress
Section 2: How to Embed Video in WordPress Posts and Pages
Section 4: How To Install the Official Twitter Plugin in WordPress

Support Center Login

Social Media Login

Social Login Joomla

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
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,032 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,032 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.
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.
12,660 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,032 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.
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.

28,002 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
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-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-10-09 8:15 am

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

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-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.

28,002 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-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? 

28,002 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-12-02 5:47 pm

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

2,377 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
2017-02-14 9:50 am

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

2,377 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-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,377 Points
2017-02-20 6:10 pm
Rakibul, we're so glad that we were able to help!
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.

Post a Comment

Email Address:
Phone Number:

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

37 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!