I had the very same problem. None of googled articles suggesting trivial solutions (like “resize image”, “wait a bit”) helped.
Symptoms: media uploading works perfectly, but only for some files (larger than 1Mb) the “HTTP error” occurs.
But when I tried to check my web server logs, everything became clear in one second. I suppose you use nginx (as I do), so:
- Check nginx logs:
tail /var/log/nginx/error.log
- If you see errors like
10899 client intended to send too large body: 1198151 bytes, client: <IP address>, server: example.com, request: “POST /wp-admin/async-upload.php HTTP/1.1”, host: “example.com”, referrer: “http://example.com/wp-admin/post.php?post=<post id>&action=edit”
than it’s easy – your webserver is blocking requests larger than 1 Mb (nginx default) - So modify your nginx config
sudo vi /etc/nginx/nginx.conf
- Insert
client_max_body_size 20M;
somewhere in the [http] section. - Restart nginx
sudo /etc/init.d/nginx restart
orsudo service nginx reload
- Check your site and make sure it works (or at least there are no more nginx errors in the log)
Reference: https://websistent.com/fix-client-intended-to-send-too-large-body-nginx-error/