MOODLE 3.x:

max_input_vars

Problem

Moodle is showing the following warning.

max_input_vars
PHP setting max_input_vars is recommended to be at least 5000.

max_input_vars

CAUSE

max_input_vars by default is500, and Moodle version 3.9 and higher requires 5000.max_input_vars is something like "sanity check". It limits requests to a reasonable level to prevent things like DoS (Denial-Of-Service) attacks.

Resolution

Change directly in webserver

If you using Linux webhosting you need to login to SSH and edit php.ini "/etc/php/7.x/fpm/php.ini"

/etc/php/7.x/fpm/php.ini

Change from
max_input_vars = 500
To
max_input_vars = 5000

systemctl restart php-fpm

Change setting in Plesk

In your Plesk hosting portal, visit “PHP Settings” > "Additional directives" > "Additional configuration directives" and add the following command max_input_vars = 5000
Save the config and reload your Moodle page.

max_input_vars = 5000

max_input_vars Plesk