How to adjust max_vars_input on CWP

To adjust the max_input_vars setting on CWP (CentOS Web Panel), you can modify the PHP configuration for the server or for specific domains. The max_input_vars setting controls the maximum number of input variables that PHP can process in a single request, and increasing it may be necessary for hand

Last updated 30 Nov 2026Also in: CWP

To adjust the max_input_vars setting on CWP (CentOS Web Panel), you can modify the PHP configuration for the server or for specific domains. The max_input_vars setting controls the maximum number of input variables that PHP can process in a single request, and increasing it may be necessary for handling large forms or complex applications.

A. Adjust max_input_vars Globally( for a Specific PHP Version )

Please note that if you are on free version of CWP, the following steps will make changes for the current PHP version. However if you are on pro-version, you can use PHP Selector feature to make changes for each PHP version independently.

Steps

1. Log into CWP Admin using these steps
2. Open the PHP ini file
  • From the CWP admin dashboard, on the left-side pane, go to PHP Settings->PHP.ini COnfiguration and click on it.

3. Edit the php.ini File
  • You will be directed to the page where you can edit the php.ini configuration file.
  • Alternatively, you can edit the file manually via SSH at the following location
/usr/local/php/php.ini
  • Search for the max_input_vars setting in the php.ini file and remove the preceeding semi colon, then give it a value that you want
  • If it’s not already present, add it
max_input_vars = 3000

4. Save Changes:

  • After making the change, save the file.

5. Restart Apache/PHP-FPM:

  • For the changes to take effect, you need to restart the web server or PHP-FPM depending on the PHP handler in use.
  • You can restart services via CWP’s interface or by running the following commands via SSH:
systemctl restart httpd   # For Apache

systemctl restart php-fpm # For PHP-FPM

A. Adjust max_input_vars for a Specific Domain

To adjust max_input_vars for a particular domain, you can use a .htaccess file or modify the php.ini file specific to the domain.

  • Access the Domain’s user panel using these steps

  • On the panel’s landing page, check the left side pane and go to CWP Settings->Edit php.ini or scroll down toCWP Settings->Edit php.ini

  • Click on Edit php.ini to access the php.ini editor
    • Click on Advanced Editor. You will see other existing settings in the editor.

  • On a new line, add the following code. Adjust the 3000 to be a value that you desire.
max_input_vars = 3000

  • Once added, click on Save to save your changes

By following these steps, you can adjust the max_input_vars setting globally or for specific domains on your CWP (CentOS Web Panel) server.

Was this article helpful?