This post was last updated on 9/5/2018
I believe many people encountered this HTTP error when uploading images to WordPress.
The last time this happened to us was several days ago, after the hosting transfer, so I thought to share with you several solutions that may help you solve this problem.
This error appears after the image is “struggling” to upload for a while. Sometimes, the image is uploaded even if the error appears.
Most of the time it’s the image’s size (height and width) that causes this, so trying to upload big images could trigger the issue.
13 solutions for the HTTP error
Sometimes, the error can appear just once, for a particular image, but if it persists, try the solutions below.
Here’s how the HTTP error looks like when you try to upload an image:
In order to make a screenshot of the error, I’ve tried to upload a big sized image, and as you can see, it did trigger the error.
Now let’s get to our solutions:
1. Optimize the images by decreasing their size. Don’t add a 2000 x 1500 image, for example. If your post content area is 700px wide, don’t add an image larger than that.
2. Change the image’s extension from .png to .jpg, or vice versa, then upload it again.
3. If the problem appears after installing a plugin, deactivate it and try it again. Some plugins can trigger the error.
4. Increase your PHP memory by adding this code
define('WP_MEMORY_LIMIT', '64M') into your wp-config.php file.
Increasing your PHP memory limit might not work if your host does not allow you to increase the PHP memory limit, especially on shared environments.
So, I suggest talking to your web host’s support and figure out a solution.
Read this guide if you need to know how to access and edit your WordPress files.
5. Add one of these codes in .htaccess:
# Exclude the file upload and WP CRON scripts from authentication
Allow from all
Deny from none
AddType x-mapp-php5 .php (at the very top of your .htaccess file)
The codes can differ from server to server, so it’s best to contact your hosting support and ask them if it’s alright to add one of the codes, or ask them to do it for you.
6. Check with your hosting company to make sure that they are using PHP 5.2.4+ and they haven’t limited anything regarding uploads.
Once, when we were on HostGator (this is an affiliate link), someone from support was checking out an issue and discovered that we didn’t have the correct version of PHP. So it’s a good thing to “bug” your hosting support and ask them.
7 (Update). This fix was pointed out by a couple of our readers. We thank them for that!
Make sure you don’t have an apostrophe in the image file’s name (e.g. mary‘s-wedding.png), because that will trigger the error as well.
8 (Update). If you’re using an image optimizer plugin, deactivate it and see if that solves the issue. If the plugin was the cause, try different configuration settings or contact the plugin developer.
We’ve experienced such an issue with the EWWW Image Optimizer plugin, which triggered the HTTP error when we were uploading PNG files. It was working fine with JPEG files, but PNGs are better in some cases, so we really wanted to fix the issue, which we did, with the help of the developer.
9 (Update). Backup your site and then switch to a WordPress default theme (e.g. Twenty Seventeen). If the problem is solved, then it’s a theme issue or a hosting related issue (see below why).
First, contact the theme developers to have a look. If they can’t seem to fix it, contact the hosting company.
Scenario – this happened to us recently. I received the HTTP error and nothing worked until I switched themes and the problem was solved. So it had something to do with the theme or the theme combined with something else.
I contacted the theme developers and they managed to partially fix the issue by installing a thumbnail regeneration plugin, but when I deactivated the plugin, the problem reappeared.
Since I don’t like having unnecessary plugins installed, especially for something that should work fine from the start, I didn’t let it go.
After checking things out with Chrome’s Developer Tools, I’ve spotted a server error, so I contacted the hosting company which changed the PHP version to 7, and that fixed the problem!
10 (Update). This was pointed out by Ellen in the comments section.
Check your file path, especially if you migrated your site.
Got to Settings -> Media and check the path at Store uploads in this folder under Uploading Files. It should be something like
11 (Update). This was pointed out by Vivek Kumar and Niche Apex in the comments. Thanks!
Switch to another browser, especially if you are using Chrome, which seems to trigger the HTTP error.
12 (Update). This was pointed out by BekBek in the comments. Thanks!
This fix already worked for some, and it might work for many others.
Try uploading the images only via Media -> Add New -> then Select files.
13 (Update). This was pointed out by pjmarket in the comments. Thanks!
If your image file name is in another language (e.g. Farsi, Mandarin, and so on), rename it and use English.
Even though WordPress allows you to upload file names using different languages, sometimes, it might cause an error.
If none of the above solutions work, then you should definitely contact your hosting support. If you have a good hosting company, I’m sure they will help you out and solve the issue for you.
It can be very annoying and frustrating getting that HTTP error when uploading images to WordPress, but I’m pretty sure that one of the above solutions will work for you.
Usually, the problem is the image itself, so start with the easy solutions first, like decreasing it to web-size or changing its extension.
Hope the post helped you out! Don’t forget to share!
You can also follow us on Twitter and subscribe to our YouTube channel.
If you want to start your own WordPress blog, or need a website for your business, our WordPress installation service is at your disposal!
I’ve been struggling with this for a week and I can’t fix it. My hosting company has been useless!
I wonder if it’s because my site is running PHP 5.2.17
We’re sorry to hear that! We stumble upon all kinds of issues all the time, so we know how frustrating it can be.
Your site must run on PHP 5.2.4+. Isn’t your hosting company providing that version or higher?
I tried loads of fixes listed on various websites, however the fix that worked for me was to add a line of code to the .htaccess file to modify the PHP version being used.
The default our web hosting provider was using 5.5, but 5.6 and 7.0 can also be specified.
Adding the following line of code to the .htaccess file cured the image upload issue for me on various sites.
AddHandler application/x-httpd-php56 .php
(Note the gap before .php should be left exactly as shown)
For 7.0 it would be:
AddHandler application/x-httpd-php70 .php
Your web hosting provider should be able to advise you what versions of PHP they support.
Your site is unusable on Chrome. If I try to scroll down to read, it quickly scrolls to the bottom of the page. If I try to scroll up, it zooms to the top. There’s no way to read the content.
Thank you very much for letting us know! We really appreciate it!
This is will be a tricky one. We’ve checked ourselves and also asked some other people to check things out, and it seems to be working fine.
It may be one of those frustrating problems that occurs occasionally, or only to some users, so it will be very hard to spot and fix if it doesn’t happen on our end as well.
The thing is that we did a lot of tweaking in order to improve the site’s speed, and we noticed that some plugins, like W3 Total Cache’s and Bj Lazy Load, caused some problems, but we thought we solved them. It’s clearly an issue caused by a plugin or a plugin’s setting.
We’ll try our best to get to the bottom of this.
Did you encounter this issue on the entire site?
I too am having trouble on your site while using Chrome. It is sitewide. I hope this helps!
That is funny.
Your site is most definitely NOT working properly on Chrome. It scrolls crazily and you can’t use the mouse. You have to use the up and down arrows to navigate. Have a few more people test it for you who aren’t in your office/country.
Thank you Max and Amanda for letting us know this! We really appreciate it!
We’ve put other people to check it out and everything seemed fine. It’s one of those frustrating problems that only happen to some users, that’s why it’s so hard to spot and fix. We can’t check things out in order to see what’s causing this.
Chrome is also a bit “difficult” as a browser. There’s always something that doesn’t work properly on Chrome. For example, some images don’t appear properly (or at all) when using the BJ Lazy Load plugin, so we had to delete it.
It could be one of the minified files from W3 Total Cache which is causing this, but we aren’t able to see which one because it works fine for us.
Our hosting company was also blocking some IPs from the CDN company, so we thought that could have been the issue…
We’ll keep on working on the issue and fix it as soon as possible! Many thanks for the heads up!
Received your email. I came back and checked, and yes the problem seems to be fixed. I am using Chrome and Windows 8, BTW, not a Mac. I tried my Mac at home over the weekend on your site, running Chrome and Firefox as the browsers and there were no issues.
That’s awesome news!
Thank you very much for your time and help! It was very kind of you.
I’ll pass the new info to the theme’s support, so they can check things out.
For those that are using Hiawatha and face the same issue, apart of the changes in php.ini and read/write rights.
Add this lines on your /etc/hiawatha/hiawatha.conf
Port = 80
MaxRequestSize = 1000000
MaxUploadSize = 550
Port = 443
SSLcertFile = /etc/hiawatha/serverkey.pem
MaxRequestSize = 1000000
MaxUploadSize = 550
Thanks for the great info!
My pdf file name had an apostrophe in the file name. Removing it fixed this issue.
That could cause issues as well! Thanks for the info!
Its the apostrophe in the file name its that simple. Everyone is wasting there time with this problem and its that simple to fix it.
Yes, that can trigger the error too, but it’s not the most common issue from what we’ve seen. Usually this happens because of the memory limit and file size.
Recently, we’ve been getting the error again when uploading PNG files, and it’s caused by an image optimization plugin.
Struggled with this as well. The solution was actually a simple one and I thought that perhaps you might want to add it to the solutions. Silly me, when I saved the image for web, I added an apostrophe (e.g. it’s-an-error) in the title. After removing the apostrophe (e.g. its-not-an-error), the problem was solved.
Thanks for the info! We’ll add this to the solutions, since we are starting to see that’s pretty common too.
I get this issue. regularly. While the http error does come up, the picture actually loads i.e. if I go to another page and then back to the image library, the image will be there.
It happens on more than one of my site so I don’t think it is a problem with the specific site.
In my case, I think it is due to the image optimizer that is comes with my theme – Thrive Themes. Maybe it takes a bit longer than expected to load so the error comes up.
However, I did also experience this issue on a a few occassions before changing tho this theme so there must be more than one thing which can cause the issue.
Yes, the picture does load in the media library. And an image optimizer feature can trigger the error, like we have experienced lately with the EWWW Image Optimizer plugin.
It was the optimization plugin… thank you so much!
You’re most welcome! We’re glad that our article helped you out!
Good info. Changing the .htaccess worked like a charm for me with WP 4.3.1
Thanks for sharing!
We’re happy that it worked for you!
hello.. pls i need your help,, for a while now i get to see this http error while an uploading mp3… pls is my memory full or whats wrong pls i need ur response urgently,, thanksYour Message :
We replied to your email.
I am facing the problem described in your screenshot, but only with some of my images. I have 25 images, smaller than 1MB each, and 5 of them are not being uploaded (not the 5 biggest ones …). 2 of them are portrait, 3 are landscape.
Any ideas what could be the problem?
Thanks in advance
Hello! Did you go through all our fixes and they still don’t work?
option 1 works for me thanks for sharing this article
Hello! We’re glad that it works for you! Thank you for letting us know.
Thanks! This really helps me!
Hello! That’s great!
I used up (8) linked to the plugin and the problem was solved! Thanks admin for this article very helpful.
I am facing a big Issue on My blog. I have not be able to access WordPress dashboard after login, because it is showing HTTPS, but I have not done any changes to my site in last few days, it’s just I updated some bulk plugins.
I just able to login using my username and password and that’s it, can’t go ahead. Please help me out. It’s urgent.
Not been able to access dashboard from 24 hours now.
Hello! We don’t really understand the problem, unfortunately. If we access your site through HTTPS, we noticed that it’s improperly set up: “The owner of http://www.bestacousticguitarreview.com has configured their website improperly”. You might want to check this with your hosting. Also, check this – http://codex.wordpress.org/Administration_Over_SSL.
thankyou it’s working charm…..
I am having same issue- exact ditto.
What is do now is – I use my Mobile data to upload all images and then I access it from library on my fast wifi.
I know this sounds lame, but I got no other solution for this problem.
Plus No one is there to help – Godadday (who sold me wordpress) barely know anything about the faults and fixtures.
And no wordpress team assistance :(
So thats a patch work we do here.
Hello! Yeah, you won’t get much help from GoDaddy, we noticed that. It could be some sort of problem on their end, if everything else doesn’t work.