PHP / Nginx: Increase max file upload and post max size
Lets Try
. min read
Firstly, you need to locate your php.ini file. In this example, our php.ini file is located in /etc/php/7.4/fpm/php.ini
sudo nano /etc/php/7.4/fpm/php.ini
In nano -
Press CTRL + W and search for upload_max_filesize and change the value to 128M (for 128 megabytes).
; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 128M
Press CTRL + W and search for post_max_size and change the value to 128M (for 128 megabytes).
; Maximum size of POST data that PHP will accept. ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size post_max_size = 128M
Save file and exit. (Press CTRL + X, press Y and then press ENTER)
Now restart PHP-FPM
service php7.4-fpm restart
You may also need to edit the Nginx configuration file.
More Stories from
Deploy Boxcoin SAAS on VPS Ubuntu Nginx Server
Looking for the fastest way to run Boxcoin Crypto SAAS on Ubuntu server? We cover the full installation process on Self-Managed VPS of webdock, hetzner, aws
Set Up Daily MySQL Backups to DigitalOcean Spaces (S3-Compatible)
Step-by-Step Guide to implement Automated MySQL Database Backup to DigitalOcean Spaces or s3 compatible buckets (With Retention & Logs) on Ubuntu server.
Raspberry Pi NAS: Install OpenMediaVault + CasaOS (Step-by-Step Guide)
Turn your Raspberry Pi into a powerful NAS by installing OMV for RAID storage and CasaOS for a simple UI—build a secure, user-friendly home cloud.
Window Server 2025 Contabo VPS Install Guide
Window server in contabo is very costly but you can deploy your license key with custom image.
Setting up SSH keys to a Ubuntu Server with Mac
Generating SSH keys on a Mac for use with an Ubuntu server is a straightforward process. Here’s a step-by-step guide: Generate the SSH Key Pair







