This post was concluding updated on 9/5/2018

Cloudways

I believe many people encountered this HTTP error when uploading images to WordPress.

The last time this happened to usa was several days ago, after the hosting transfer, so I thought to share with you several solutions that may help you solve this problem.

Cloudways

This error appears after the paradigm is "struggling" to upload for a while. Sometimes, the image is uploaded fifty-fifty if the error appears.

Well-nigh of the time it'due south the epitome's size (acme 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 announced just once, for a item epitome, but if it persists, endeavor the solutions below.

Cloudways

Hither's how the HTTP error looks similar when you attempt to upload an image:

Http error when uploading images to WordPress

In order to make a screenshot of the fault, I've tried to upload a big sized epitome, and equally you tin can see, it did trigger the error.

At present let'south get to our solutions:

Cloudways

1. Optimize the images by decreasing their size. Don't add a 2000 x 1500 image, for example. If your post content surface area is 700px wide, don't add an image larger than that.

two. Change the epitome'southward extension from .png to .jpg, or vice versa, then upload it again.

iii. If the problem appears afterwards installing a plugin, deactivate information technology and attempt it again. Some plugins tin can trigger the fault.

4. Increment your PHP retentivity 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 yous to increase the PHP memory limit, particularly on shared environments.

Then, I propose talking to your web host's support and figure out a solution.

Read this guide if yous need to know how to access and edit your WordPress files.

v. Add 1 of these codes in .htaccess:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

or

# Exclude the file upload and WP CRON scripts from authentication
<FilesMatch "(async-upload\.php|wp-cron\.php|xmlrpc\.php)$">
Satisfy Whatever
Guild permit,deny
Allow from all
Deny from none
</FilesMatch>

or

AddType x-mapp-php5 .php (at the very acme of your .htaccess file)

The codes can differ from server to server, so it'south best to contact your hosting back up and ask them if it's alright to add 1 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.ii.4+ and they haven't express anything regarding uploads.

Once, when nosotros were on HostGator (this is an affiliate link), someone from support was checking out an outcome and discovered that nosotros 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'south name (e.g. mary's-wedding.png), because that will trigger the error besides.

8 (Update). If you lot're using an paradigm optimizer plugin, deactivate it and come across 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 outcome with the EWWW Prototype Optimizer plugin, which triggered the HTTP error when nosotros were uploading PNG files. It was working fine with JPEG files, just PNGs are amend in some cases, so we really wanted to set up the upshot, which we did, with the assistance of the developer.

9 (Update). Backup your site and so switch to a WordPress default theme (east.g. Twenty Seventeen). If the trouble is solved, then it's a theme issue or a hosting related upshot (see below why).

First, contact the theme developers to have a look. If they can't seem to set up it, contact the hosting company.

Scenario – this happened to united states recently. I received the HTTP error and nothing worked until I switched themes and the problem was solved. Then it had something to practice with the theme or the theme combined with something else.

I contacted the theme developers and they managed to partially fix the consequence by installing a thumbnail regeneration plugin, only when I deactivated the plugin, the trouble reappeared.

Since I don't like having unnecessary plugins installed, especially for something that should piece of work fine from the outset, I didn't let it go.

After checking things out with Chrome's Programmer Tools, I've spotted a server mistake, then I contacted the hosting visitor which inverse the PHP version to vii, and that stock-still the problem!

10 (Update). This was pointed out by Ellen in the comments section.

Bank check your file path, particularly if you migrated your site.

Got to Settings -> Media and check the path at Store uploads in this folder nether Uploading Files. It should be something like /home/username/public_html/wp-content/uploads.

Uploading files wordpress

xi (Update). This was pointed out past Vivek Kumar and Niche Apex in the comments. Thanks!

Switch to another browser, peculiarly 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 information technology might work for many others.

Try uploading the images only via Media -> Add New -> and then Select files.

xiii (Update). This was pointed out past pjmarket in the comments. Cheers!

If your paradigm file name is in some other language (e.g. Farsi, Mandarin, and so on), rename information technology and use English language.

Fifty-fifty though WordPress allows you to upload file names using different languages, sometimes, it might cause an error.

If none of the in a higher place solutions work, then you lot should definitely contact your hosting support. If yous have a good hosting company, I'thou certain they will help you out and solve the issue for you.

Conclusion

It can exist very annoying and frustrating getting that HTTP error when uploading images to WordPress, but I'thou pretty sure that i of the above solutions volition work for you.

Unremarkably, the problem is the image itself, so start with the easy solutions kickoff, 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 desire to offset your own WordPress blog, or demand a website for your business concern, our WordPress installation service is at your disposal!