Go to nginx.conf
sudo nano /etc/nginx/nginx.conf
Add the following line:
client_max_body_size 100M;
in http section as highlighted below:
![](https://studyraft.com/wp-content/uploads/2022/05/image-4-1024x930.png)
Restart nginx
sudo systemctl restart nginx
Get the PHP version installed on your machine
php --version
Get the major version (7.4 for example) out of the info from the above output.
Run the following command to edit php.ini file:
sudo nano /etc/php/7.4/fpm/php.ini
Above, 7.4 is the version of php. Edit the following line to increase limit:
post_max_size = 100M
upload_max_filesize = 100M
![](https://studyraft.com/wp-content/uploads/2022/05/image-5-1024x411.png)
Restart PHP
sudo systemctl restart php7.4-fpm
Restart nginx
sudo systemctl restart nginx