The PHP Max Input Vars 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 is useful to confirm what version of PHP you are currently running. Older versions, such as 5.x, are commonly offered as the default by shared hosts for compatibility reasons. They may also limit max_input_vars to around 1000, even if you subsequently specify a higher value using the steps described in this article.

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.

Many reputable shared hosts offer the ability for you to 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 the PHP Max Input Vars

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 have direct access to the php.ini file, otherwise, skip to the next method.

  1. Locate the php.ini file. It is usually in the root folder of your WordPress installation. For Bitnami installations, it will be at /opt/bitnami/php/etc/php.ini.
  2. Open the file and locate the line of code that reads max_input_vars = N, where N represents the current value specified for the maximum number of variables.
  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 .htaccess file. This is normally stored in the root folder of your WordPress installation. If you can’t locate it, it may 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 software you are using, so please consult your software vendor’s documentation for more information.
  2. Open the .htaccess 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, then your WordPress installation may overwrite it.
  4. Save the file and exit.
  5. Remember to restore your text editor settings to hide invisible files, if you like.

Verifying PHP Max Input Vars

Once you have modified max_input_vars to the new value, you can verify the change using the following steps. 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 value here should now match the new figure you specified.