WordPress Nginx HTTP error on Image Uploader Fix

http-error

If you are experiencing the infamous “HTTP Error” when uploading images on your Nginx WordPress install it can be quite frustrating. Here is a fix that worked for my particular environment. Please note, this is by far a ‘fix-all’ solution but it worked for me and ‘alanpuccinelli’ who shared this particular solution in this WordPress Forum thread.

How to Fix the Issue

1. SSH to your machine using terminal, putty, etc.

2. Open your nginx.conf file with your favorite editor

sudo nano /etc/nginx/nginx.conf

3. Add client_max_body_size 100m; to the http { } section of your site.

http {
     
        #Basic Settings        
        client_max_body_size 100m;

}

4. Restart Nginx service sudo service nginx restart

Test the upload again and see if this has resolved your issues. Please share your experience below in the comments!