The PHP max input variables (or max_input_vars value) is the maximum number of variables your server can use for a single function. To work correctly with modern WordPress themes, we recommend setting this value to 3000. If the setting is too low, you may experience problems such as lost data and disappearing widgets.

Check your PHP Version

Before modifying anything, it’s useful to check what version of PHP you’re using. Older versions, such as 5.x, are often the default used by shared hosts for compatibility reasons. They might also limit max_input_vars to around 1000, even if you specify a higher value using the steps described in this article.

To check your version of PHP, from the WordPress Dashboard:

  1. Select Tools > Site Health.
  2. Click the Info tab.
  3. Scroll down to Server and click to expand.
  4. Look for the value PHP version.

Reputable shared hosts will let you modify the PHP version yourself within their administrative control panel. We recommend using PHP Version 7.3 or higher for modern WordPress themes.

How to increase PHP max input variables

Method 1: Edit the php.ini file

Many shared hosts prohibit you from having direct access to the php.ini file. Only use this procedure if you can access the file, otherwise, skip to the next method.

  1. Locate the php.ini file. Search your web host’s knowledge base for php.ini and you should come up with where to find it.
  2. Open the file and locate the line of code that reads max_input_vars = N, where N represents the numeric value currently specified.
  3. Set the value to your desired limit, for example, max_input_vars = 3000;.
  4. Save the file and exit.

Method 2: Edit the .htaccess file

  1. Locate the .htacess file. This is normally stored in the root folder of your WordPress installation. If you can’t locate it, it might be because it is hidden. Most text editors have a menu option to Show hidden files or Hide invisible files, or similar- the exact location and label of the menu item will differ depending on the application you’re using, so consult your software vendor’s documentation for more information.
  2. Open the .htacess file.
  3. Add the code php_value max_input_vars 3000 on a new line following the code # END WordPress. If you add the code before # END WordPress your WordPress installation may overwrite it.
  4. Save the file and exit.

Verify the new PHP max input variables

Once you have modified max_input_vars to the new value, you can confirm the change from the WordPress Dashboard:

  1. Select Tools > Site Health.
  2. Click the Info tab.
  3. Scroll down to Server and click to expand.
  4. Look for the heading PHP max input variables. The figure here should now match the new value.

Never forget another password.

See how Dashlane can give you a safer, simpler life online.

Try the password manager that makes the Internet easier by auto-filling your passwords, payments, and personal info.

Claim your 6 months of free premium access now.

Claim my free subscription