Cara menggunakan php max input vars

There are certain scenarios in which you may need to make changes to your PHP configuration. Specifically, you may need to edit a file on your server called php.ini, and to increase the max_input_vars limit.

Table of Contents

  • What is the PHP Input Vars?
  • How to Increase PHP Max Input Vars Limit?
  • Edit the .htaccess File
  • Edit the PHP.ini file
  • Edit the wp-config.php File
  • How to Increase the Max Input Vars Limit in PHP5?
  • Possible Server-Side Issues
  • What is max_input_vars PHP?
  • How do I change the PHP input vars limit in WordPress?
  • Where do I change PHP max input variables?
  • How do I change PHP input VARS to Max in cPanel?

Table of Contents

  • What is the PHP Input Vars?
  • How to Increase PHP Max Input Vars Limit?
  • Edit the .htaccess File
  • Edit the PHP.ini file
  • Edit the wp-config.php File
  • How to Increase the Max Input Vars Limit in PHP5?
  • Possible Server-Side Issues
  • What is max_input_vars PHP?
  • How do I change the PHP input vars limit in WordPress?
  • Where do I change PHP max input variables?
  • How do I change PHP input VARS to Max in cPanel?

max_input_vars is a setting managed through the PHP setting which limits the number of inputs you can set when posting forms.

While we do not allow global changes to the PHP.ini configurations on our servers , per account PHP configuration changes can be made from cPanel by following these steps:

1) Log into cPanel.

2) Look for the SOFTWARE section and click on Select PHP version

The PHP Selector is not included by default in cPanel and might be missing from your account if you are hosting with a different web host. All ChemiCloud customers should see the Select PHP Version section in their hosting account’s cPanel.

Cara menggunakan php max input vars

cPanel > Software > Select PHP Version

3) In the new window click on the Switch To PHP Options button.

Select PHP Version > Switch to PHP Options

4) Here you can locate the max_input_vars and enter the value that you require.

Check your script, plugin, or theme’s documentation (or an on-screen error message) to find the correct value.

5) Once you’ll do any change, please do a left-hand side click anywhere outside the dropdown or text input box. If the change was successful, you will see a green box with a message which will confirm that the change has been applied.

That’s all! Now you know how to increase the number of inputs limit in cPanel.

If you enjoyed this tutorial, then you’ll love our support! All ChemiCloud’s hosting plans include 24/7 support from our amazing support team. Check out our web hosting plans and have your website migrated today!

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 .htaccess File

The first method to increase Max input var limitation is by editing the .htaccess file. Before you make any changes to the file, make sure you get a backup of your site.

Usually, this file is in the root directory of your host. If you can’t locate it, it could be because most hosting providers hide the (.) files. Therefore, look for the Show Hidden Files option in your configuration and enable it.

Open the .htaccess file in an editor and add the following code to it:

php_value max_input_vars 3000

or if you are using Suhosin, add the following to the file:

php_value suhosin.request.max_vars 3000
php_value suhosin.post.max_vars 3000

The recommended value is 3000 for PHP input vars. In case you need more; you could always increase it to match your needs.

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.

How to Increase the Max Input Vars Limit in PHP5?

If you are using a host that still uses PHP5 like GoDaddy or Bluehost, you need to edit php5.ini and user.ini files.

So, if you are using a host that still uses PHP5, you need to create the files mentioned above in the host. After creating them, copy and paste the following code to both:

max_input_vars = 3000
suhosin.get.max_vars = 3000
suhosin.post.max_vars = 3000
suhosin.request.max_vars = 3000

Again, you can replace 3000 with the value your website needs.

Possible Server-Side Issues

If you tried each of the methods above and still getting the max input vars error, you need to contact the hosting provider and ask them to fix the issue for you.

There could be a copy of the php.ini file in the host and that could confuse your host. Thus, look for the file and delete it.

In this article, we discussed every possible method to increase th PHP max input vars limit in WordPress. Keep in mind, follow the steps above if only you are familiar with working with server files. Otherwise, contact your hosting provider and ask them to help you.

What is max_input_vars PHP?

The PHP setting max_input_vars determines how many input variables may be accepted (limit is applied to $_GET, $_POST and $_COOKIE superglobal separately). If there are more input variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request.

How do I change the PHP input vars limit in WordPress?

How to Increase the Max Input Vars Limit.

In your WordPress root installation locate any of these .htaccess , php.ini , .user.ini or wp-config.php..

Edit the file and paste the directive code..

Once you are done making changes save the file..

Where do I change PHP max input variables?

By default, the maximum number of input variables allowed for PHP scripts is set to 1000. You can change this amount by setting the max_input_vars directive in a php. ini file. To verify the current value of the max_input_vars directive and other directives, you can use the phpinfo() function.

How do I change PHP input VARS to Max in cPanel?

How to increase the max_input_vars limit in cPanel.

1) Log into cPanel..

2) Look for the SOFTWARE section and click on Select PHP version..

3) In the new window click on the Switch To PHP Options button..

4) Here you can locate the max_input_vars and enter the value that you require..