Have you received Increase the Max Input Vars Limit error on WordPress? Max Input Vars can easily get increased by using a line of code.
PHP max input vars is simply the number of variables your server is set to handle in each function. If you receive the error ‘Increase PHP Max Input Vars Limit' in WordPress, you need to add the code ‘php_value max_input_vars 3000' to your .htaccess file. We explain how to do this and other methods below.
What is the PHP Input Vars?
Before we talk about methods to increase PHP Max Input Vars in WordPress, let us explain what exactly is PHP Input Vars?
PHP input Vars is the number of variables your server can use to run a function. This value is set to 3000 for updated and modern WordPress themes.
As you probably know by now, if the value of PHP input vars is not enough, you will get the Max Input Vars error.
This error can cause a lot of issues. For example, you may lose all of your data or the template you are using may lose its functionality. In addition, the activated widgets on your website may disappear.
There are many different methods to increase the PHP Max Input Vars in WordPress. However, it totally depends on the hosting provider you are using.
In this article, we are going to discuss all the possibilities in cPanel. If you are using another hosting panel, the interface may be different. However, the methods are still the same.
Keep in mind, you may not have certain permissions to increase the PHP max input vars limitation. Therefore, contact your hosting provider beforehand and ask them to give you the required permissions.
How to Increase PHP Max Input Vars Limit?
You can increase the PHP Max Input Vars Limit by adding lines to the .htaccess file, php.ini or wp-config.php. Here we explain all these methods.
Edit the PHP.ini file
The next method to increase the PHP max input vars limit in WordPress is through editing the php.ini file. This file is also in the root directory of your host where you have installed WordPress. If you can’t find it, simply, create a php.ini file.
In either case, open the file in an editor and add the following code to it:
max_input_vars = 3000
Don’t forget to save the changes and reboot your server once, to use the newly added data.
Edit the wp-config.php File
This method also requires you to log in to your hosting panel or FTP. Go to File Manager and look for the wp-config.php file. Open the file in an editor and add the following code to it:
@ini_set( 'max_input_vars' , 3000 );
Finally, save the changes.
You can replace 3000 with any value you require. However, we recommend 3000 or above, if you use any value below 3000, it could cause the Max Input Vars error.