I ran into an issue when uploading large files to Wordpress using the new drag and drop media uploader. The file would upload to 100% then immediatly show an enigmatic error message: “Http error”. It looked like this:
Switching to Wordpress’ alternative uploader (http://mywordpresssite.com/wp-admin/media-new.php?browser-uploader) revealed a bit more information about the issue and led to it’s diagnosis:
The Fix
The solution was to increase the maximum size of file uploads in Nginx. Find your nginx config file and add the following line to your server block:
For reference, here is what my nginx server block looks like with the line added:
20M means the file uploads can be up to 20 megabytes. After setting it, restart your nginx service and you should be good to go!
Didn’t work for you?
This error message is a bit notorious among Wordpress developers as being difficult to diagnose. Wordpress’ Otto42 published a post with a bunch of possible fixes which you can find here, probably a good place to start. Good luck!