Documentation » Troubleshooting
Increase max_input_vars
max_input_vars is the number of variables your website can use to run a function.
If you see an error similar to PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini, this guide will help you raise it to a higher value so all the variables that are needed can run.
The directive can be set in the .htaccess, php.ini, .user.ini or wp-config.php file. To access these files you will need FTP credentials. If you don’t have them, contact your hosting provider.
Update PHP first #
Before you change any of those files, we suggest updating your website to the latest version of PHP. Some older versions of PHP limit max_input_vars to something like 1000, even if you specify a higher number.
We always suggest using the latest stable version of PHP available at PHP.net. You can also check which versions your hosting company offers and use the latest one, as hosts don’t always offer the newest release right away.
How to increase max_input_vars #
- In your WordPress root installation, locate one of these files:
.htaccess,php.ini,.user.iniorwp-config.php. - Edit the file and paste in the directive for that file (below).
- Save the file. If you downloaded the file to make the change, upload it back to your server and overwrite the existing file.
Directive for .htaccess #
php_value max_input_vars 2500
Directive for php.ini or .user.ini #
max_input_vars=2500
Directive for wp-config.php #
@ini_set( 'max_input_vars' , 2500);
Note: The minimum recommended limit is 2500. If your website already has a higher value, keep it. If not, we suggest using 2500.