I have a WordPress website, and I wanted to install a plugin in it, but it shows the error in “increase max_input_vars in php.ini.”
I am confused with PHP max input vars: how it works, and how to increase the PHP max input vars in WordPress and from Cpanel.
PHP Max input vars limits the number of input variables your server can use for a single function. If your website is WordPress, I suggest you put the value of PHP max_input_vars: up to 3000. Usually, the value max_input_vars is set to 1000 by default.
You can change the PHP max_input_vars value in the .htaccess or the php.ini file in the WordPress directory. Follow the steps to change the PHP max_input_vars:
Top 3 Methos to update PHP max_input_vars:
Update PHP Max_Input_Vars in .htaccess
Find the .htaccess file in the root of your wordpress website directory and add the below line at last:
Update PHP max_input_vars: in php.ini file
Find the php.ini file in the root folder of your WordPress. If you do not find the php.ini file, you can create the php.ini file in the root folder of WordPress installation and write the below line and save.
Update PHP max_input_vars in wp-config.php File
Find the wp-config.php file in the root folder of your WordPress Installation. Just open it and write the below code and save.
Thanks you so much, it really helped me! Thanks again
I faced the same issue a few months ago, but I fixed it through cancel. I think, it’s the fastest way to change the PHP max_input_vars. Please follow these simple steps:
PHP.INI File Method:
Please add the following code in a file named php.ini. You can find this file in the WordPress root folder. If you did not found the file, you can create the file php.ini in the root folder and place the following line.
.htaccess File Method:
You can find the file named “.htaccess” in the root folder. Place the below code in the new line of htaccess file at last.
When setting up some of the WordPress themes or plugins, you may see this kind of error messages. It asks you to increase PHP Max_Input_Vars in your Cpanel or theme. You may go through several options like htaccess, php.ini, wp-config or Cpanel. I usually use htaccess and wp-config method.
Add this code in htaccess file