How to Fix WordPress Image Upload HTTP Error in Nginx

Lately, I’ve started getting a HTTP error when uploading some images/videos. It’s filesize/resolution is little bigger that might the cause of it.

Here’s is how I’ve fixed it on Nginx server in less than 60 seconds.

Just open up your Nginx config. In my case it’s /etc/nginx/sites-available/ashiknes_in.conf

Then add clientmaxbody_size within your server config.

Here’s an example of it.

<code class="nginx">server {
  listen 443 ssl;
  root /var/www/example.com;
  client_max_body_size 100m;
  # Other Configs
}

That’s it. Now you can upload images :)

Reference → Wordimpress