How to Increase PHP Max Input Vars Limit? (Complete Guide)

Would you like to increase the PHP Max Input Vars Limit on WordPress? You can quickly increase the maximum input variables limit by adding 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.

The following sections in this article provide information on how to accomplish this and other methods.

What is the PHP Input Vars?

PHP Input Vars is a PHP security measure designed to limit the number of post variables you can use to execute a function. It defines the number of variables your server can use when running a function.

You are probably aware that if you do not have enough PHP input vars, you will receive the Max Input Vars error message.

Several complications can result from this error, including the loss of all your data and the loss of functionality of your template. Additionally, the widgets that have been activated on your website may disappear.

Similar to managing the PHP max input time in WordPress to increase the PHP timeout limit, while there are numerous ways to increase the PHP Max Input Vars in WordPress, it depends on your hosting provider.

Specific permissions may be required to increase the PHP maximum input vars limitation, so be sure to contact your hosting provider beforehand and ask them to grant you the required access.

How to check the PHP max input vars in WordPress?

If you are planning on modifying the PHP Max Input Vars, you may want to check the PHP maximum input variables in WordPress before proceeding.

You can check the PHP max input vars from the WordPress Dashboard:

  1. Select Tools
  1. Click Site Health
Open Tools → Site Health in WordPress
  1. Click the Info tab.
Open Info Tab on Site Health
  1. Scroll down to Server and click to expand.

Open Server info in Site Health Report
  1. Look for the heading PHP max input variables. This shows the max number of the PHP max input variables.
Check the PHP max input variables number

Before starting to Increase PHP Max Input Vars Limit, you should also check what PHP version you’re using. 

The older versions of PHP, such as 5.x, often the default shared hosts used for compatibility reasons, might limit max_input_vars in WordPress to around 1000, even if you specify a higher value.

Therefore, you should upgrade your PHP version to increase the PHP Max Input Vars Limit higher than 1000. 

You can modify the PHP version in the administrative control panel of a reputable shared host. It is recommended that modern WordPress themes be run on PHP version 7.3 or higher and set the value of the PHP Max Input Vars Limit to 3000.

How to Increase PHP Max Input Vars Limit?

In this article, we will explain each of the following methods in detail to give you a more detailed overview of how to increase the PHP Max Input Vars Limit to help you achieve your goal.

Method 1: Increase PHP Max Input Vars Limit in .htaccess

With this method, you will need to edit the .htaccess file to increase the maximum input variable limit. Before making any changes to the file, it is recommended that you secure a copy of your website.

This file is usually located in the root directory of your hosting account. 

Locate WordPress .htaccess File

It is also possible that your hosting provider has hidden the (.) files from view if you cannot locate them, so ensure that Show Hidden Files is enabled in your configuration.

Add the following code to the .htaccess file in an editor:

php_value max_input_vars 3000

You can also add the following to the file if you are using Suhosin:

php_value suhosin.request.max_vars 3000

php_value 3000

It is recommended that PHP input vars be set to 3000. Those who need more can always increase the amount to meet their requirements.

Method 2: Increase PHP Max Input Vars Limit in PHP.ini or .user.ini 

Another method of increasing the PHP max input vars limit in WordPress is to edit the php.ini file.

Your host should also have a php.ini file in the root directory of your host after the WordPress installation is completed. If you cannot find it, simply create this file in the root directory.

Many shared hosts prohibit you from directly accessing your PHP.ini file. You should only use this method if you have direct access to your PHP.ini file or if you are hosting on a local host.

You should follow these steps to use this method:

  1. Find your PHP.ini file; if you cannot find it, you can create your php.ini file at the root of your WordPress installation.
  2. After you find your existing PHP.ini file, open it and locate the following code: max_input_vars = xx; Then, set it to your desired limit by replacing “xx” with a number—for example, 3000.
  3. If you created your PHP.ini file in the root directory, you could add the same code: max_input_vars = 3000, or simply change the value to the recommended value.
  4. Reboot your local host or server after you have saved your changes.

Method 3: Increase PHP Max Input Vars Limit in wp-config.php

You will also have to log in to your hosting panel or FTP account to Increase PHP Max Input Vars Limit in wp-config.php; look for the wp-config.php file in the File Manager; add the following code to the file by opening it in an editor:

@ini_set( 'max_input_vars' , 3000 );
Locate WordPress wp-config.php File

The changes should be saved at the end.

You may replace 3000 or any value you prefer. However, we highly recommend replacing 3000 or a value above it. The Max Input Vars error could occur if the value is lower than 3000.

Method 4: Increase PHP Max Input Vars Limit in cPanel

Additionally, the PHP selectors in cPanel can be used to set the PHP Max Input Vars Limit automatically.

It is the easiest way to limit the number of input variables on your entire hosting account. All you need to do is set the following steps:

  1. You will need to log into your cPanel account;
  2. Under the ‘Software’ section, locate and click on the ‘Select PHP Version‘ button.
Click On “Select PHP Version” in cPanel
  1. When you are inside, click ‘Switch to PHP Options.’
Click on the “Options” Item
  1. Upon switching, scroll down to the max_input_vars. You will find a drop-down alongside it. Use the drop-down to set the maximum number of input variables you wish to use.
Change max_input_vars in cPanel

Method 5: Increase PHP Max Input Vars Limit in Bluehost

There are also three ways to modify the PHP Max Input Vars Limit in Bluehost: Generating a new php.ini file, using the File Manager, and using an FTP Client.

Generating a new php.ini file


  1. Log in to your Bluehost control panel.
  2. On the left-hand side of the page, click the Advanced tab.
  3. Click on the MultiPHP INI Editor icon under the Software section.
Open MultiPHP INI Editor in Bluehost

  1. From the list of domains, select the ones you would like to set up or update.
  2. From the left-hand menu, select which attributes of PHP you wish to change.
  3. You can increase or decrease the PHP Max Input Vars Limit on the right-hand side based on your preferences.
  4. After you have completed the update, click on the Apply button.


  1. Log in to your Bluehost control panel.
  2. Click cPanel in the submenu under the Hosting tab.
  3. Scroll down to the programming section and click on the PHP Config.
Open PHP Config in Bluehost Legacy Panel
  1. Once the changes have been made, click Save Changes.
Using the File Manager

  1. Navigate to the Files section of the menu.
  2. Click the File Manager icon.
  3. If prompted, select the Web Root directory; otherwise, navigate to the public_html folder.
  4. You should right-click the php.ini file.
  5. You may choose between Edit and Code Edit.
  6. Click the Edit button.
  7. Without quotation marks, search for memory_limit.
  8. Change the memory limit for your PHP applications by entering the new value.
  9. Make sure you click Save Changes.
Using an FTP Client
  1. Use your FTP client to connect to the server.
  2. Find the public_html folder and click on it.
  3. You will need to download the php.ini file.
  4. Use any text editor to open the file.
  5. You should search for memory_limit without the quotes.
  6. Set the new memory limit for your PHP applications.
  7. Save the file.
  8. Use your FTP client to upload the file.

Method 6: Increase PHP Max Input Vars Limit in GoDaddy

Solution 1: Using server

Input variables for PHP are derived from HTML forms and cookies if they are enabled on the page. 

The setting limits the maximum number of input variables that PHP scripts can use by default 1000. To change this amount, you should set the max_input_vars directive in your php.ini file.

Working on a website hosted on a GoDaddy shared hosting package, adding the following code to the php.ini configuration does not work.

You can add this code to your “.user.ini” file located at the www root of your website, i.e., public_html, which works. The code is: 

max_input_vars = 3000

The value of the variables will increase from 1000 to 3000 as a result.

Solution 2: Using .htaccess

The following code should be added to the .htaccess file as a recommendation:

php_value max_input_vars 1000

php_value suhosin.get.max_vars 1000

php_value 1000

php_value suhosin.request.max_vars 1000

Additionally, this can also be accomplished through the whm panel. If you have already purchased the whm panel, you can apply the value using the “PHP configuration editor.”

Method 7: Increase PHP Max Input Vars Limit in Plesk

This section will explain how to manage Plesk’s PHP max input vars limit. Let’s examine how you can manage this variable on Plesk in a few steps:

  1. First, access the Plesk GUI.
  2. After that, click on Domains.
  3. Choose the domain for which you wish to update the PHP max_input_vars.
  4. You can then select PHP Settings.
  5. Finally, enter the max input vars value in the Additional configuration directives field to make the changes and press OK.
  • For a specific version of PHP

  1. First, access the Plesk GUI.
  2. After that, select PHP Settings under Tools & Settings.
Open PHP Settings in Plesk
  1. Select the PHP version that is required.
Select the PHP version
  1. Open the php.ini tab.
Open php.ini and Edit

  1. Remove before the max input vars parameter.
  2. After entering the desired value, click OK to save the changes.


This article explained and presented various methods to show how you can quickly increase the PHP maximum input variables limit.

We hope you found this article helpful. You are welcome to leave any other questions about blogging in the comment section.If you enjoyed this article, please share it on social media. You can follow us on Facebook and Twitter as well.

Leave a Reply