The default upload max size is 2Mb. This can be changed by configuring two packages: PHP and Nginx. As an example, will set max upload to 10Mb
Nginx:
-
go to
Virtual Machine / WebServer -> OPS -> Packages -> Nginx -
Click edit
-
Go to
Advanced settings->Custom Settings Configuration -
In the script editor look for "client_max_body_size" and change from
1m;into10m; -
Save
Php:
-
Go to
Virtual Machine / WebServer -> OPS -> Packages -> PHP -
Click edit
-
Go to
Advanced settings->Custom Settings Configuration -
Look for
upload_max_filesizeand change the value to be10M -
Look for
post_max_sizeand change the value to be12M(the value must a little bit greater thanupload_max_filesize) -
Look for
memory_limit. This limits the amount of memory used by thePHPprocess. If you plan to upload very large files, consider also increasing this from123Mto512M -
Save
Now, those packages are configured from Bunnyshell to allow larger files. It's time to provision the server -
Go to
Virtual Machine / WebServer -> OPS -> Packages -
Enable (toggle button)
PHPandNGINX. The rest of the packages can be disabled. This tells Bunnyshell to change only enabled packages while leaving the others unchanged. -
Click
Deploy Changesbutton
Apache
-
nothing to do for apache
Post deploy actions
When deploy process is done, if you have Apache installed, you must restart apache in order to see the change.
service apache2 restart
If you have Nginx with PHP Fpm installed, you should restart fpm process to see the change, also restart Nginx
nginx -t
# if nginx -t resturns syntax OK, then run this command
service nginx restart
service php7.4-fpm restart
Replace 7.4 with your PHP version (7.0, 7..1, 7.2, 7.3)