Unable to upload WP plugin on Nginx

by Shaan Chopra

When You start a site and it is blank you feel really good that all is good. But to know the real potential of the site add some content. Without it, you actually would not know if anything is wrong or not. I just started this blog and was very happy but once I start using the site I came to know that I am unable to upload a plugin. So on the Nginx server, you start with nothing.

I had to add the following in my command line first to find the nginx.conf file which is at Nginx folder

sudo vim /etc/nginx/nginx.conf

Press i on the keyboard which will go into the insert mode and allow you to edit the file. After “http {” add the below line:

client_max_body_size 10M;

Press Esc key which will bring you out of the insert mode, then press :wq which will save the file. In the above code, we are allowing 10Mb for file upload.

sudo systemctl restart nginx

Now, restart your Nginx server and you are good to go.

You may also like