
Modify the Limits
If you get the following error message, saying the max upload filesize in php.ini is too small, you simply need to edit the php.ini file, increasing the required values as seen below. Note that both 1 and 2 are needed to make bigger upload sizes work, the third option is important if the upload throughput is low as it expands the timeout period, giving you more time to finish the upload:
- post_max_size = 256M --- this will allow you to upload files as large as 256M using the POST method
- upload_max_filesize = 256M --- also change the generic max upload size
- max_execution_time = 180 --- depending on connection speed, large uploads can take longer times so increase the timeout values there to 180 sec (3 minutes)
vi /etc/php/7.2/apache2/php.ini
667 ; is disabled through enable_post_data_reading.
668 ; http://php.net/post-max-size
669 post_max_size = 256M
…
…
…
820 ; Maximum allowed size for uploaded files.
821 ; http://php.net/upload-max-filesize
822 upload_max_filesize = 256M
823
824 ; Maximum number of files that can be uploaded via a single request
825 max_file_uploads = 20
…
…
…
379 ; Note: This directive is hardcoded to 0 for the CLI SAPI
380 max_execution_time = 180
Don’t forget to restart the apache service
systemctl restart apache2

Comments