Increase Upload Size when Using VestaCP
VestaCP is an open source web hosting control panel, similar to Plesk or cPanel. VestaCP considerably simplifies the administration of a web, database and mail server. By default, VestaCP sets a maximum upload file size of 2MB – that’s to small for many scenarios.
In order to increase the upload size, the php.ini must be adjusted:
nano /etc/php/7.2/apache2/php.ini
By pressing CTRL+W you can search for upload_max_filesize. The search should lead to an entry like this:
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
The entry must be adjusted to the desired value, in my case 32MB:
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 32M
After that, repeat this change for post_max_size, which is set to 8MB by default:
; 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 = 8M
And change it to:
; 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 = 32M
After that, press CTRL+O, followed by Enter and after that, press CTRL+X to save and close the file.
The last step is now a restart of the apache web server:
apachectl restart
Now, the maximum upload size is 32MB.