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; into 10m;
  • Save

Php:

  • Go to Virtual Machine / WebServer -> OPS -> Packages -> PHP
  • Click edit
  • Go to Advanced settings -> Custom Settings Configuration
  • Look for upload_max_filesize and change the value to be 10M
  • Look for post_max_size and change the value to be 12M (the value must a little bit greater than upload_max_filesize)
  • Look for memory_limit. This limits the amount of memory used by the PHP process. If you plan to upload very large files, consider also increasing this from 123M to 512M
  • 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) PHP and NGINX. The rest of the packages can be disabled. This tells Bunnyshell to change only enabled packages while leaving the others unchanged.
  • Click Deploy Changes button

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)

Did this answer your question?