PHP upload max filesize error limit

Error: Max filesize limit 2MB

Grav, as many other PHP-based softwares, relies on PHP settings. In order to fix this, you need to have access to your php.ini conf files onto the server. The server probably has many php.ini files. Steps to fix:

  • discover what php.ini file is in use by the software that gives you error. For grav, have a look at the info menu into the admin plugin


CTRL+F to find a string,

our config looks like that Settings in a grav website on Lennon - admin/config/info

look at

Loaded Configuration File /etc/php/8.0/fpm/php.ini

on the server, edit that php.ini file and raise the limit, e.g. to 20M

$ sudo vi /etc/php/8.0/fpm/php.ini

then restart the webserver

$sudo service nginx restart

or, in case fpm service is in use, the fpm service

$ sudo service php8.0-fpm restart