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

Reference → Wordimpress

👋 I'm Ashik Nesin • Sr. Frontend Engineer @Chargebee 👨‍💻• I write about modern Javascript & building web apps

© 2021 Nesin Technologies LLP