How to Fix WordPress Image Upload HTTP Error in Nginx

January 08, 2018

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.

WordPress HTTP Image Upload Error

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 client_max_body_size within your server config.

Here’s an example of it.

server {
  listen 443 ssl;
  root /var/www/;
  client_max_body_size 100m;
  # Other Configs

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

WordPress HTTP Image Upload Error Fixed

👋 I'm Ashik Nesin • Principal Software Engineer @Chargebee 👨‍💻• I write about web development & behinds the scenes of startup/side projects that I'm building

© 2022 Nesin Technologies LLP