To increase the upload limit, edit the following configuration file:/etc/php/php8.2/apache2/php.ini
Within the file, update the following parameters:
upload_max_filesize
post_max_size
These two values must be set identically. By default, both are set to 2M. For example, if you wish to increase the limit to 128M, ensure that both parameters are set to 128M.
If your application processes large or complex requests, it is also recommended to adjust the following timeout-related settings to prevent request timeouts:
max_execution_time
max_input_time
Both values can be increased up to a maximum of 300 seconds and should remain the same.
After applying the changes, restart the Apache service to ensure the new configuration takes effect:
sudo systemctl restart apache2
Once the service restarts successfully, the updated limits will be active.