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.