WordPress Services
WooCommerce Solutions
Diğer Hizmetler
Increase WordPress PHP Max Input Vars Value Welcome to our guide. When working with forms on your WordPress site, especially forms with many fields, you may sometimes encounter a “max_input_vars” error.
This error indicates that the number of variables the server can accept has been exceeded. In this guide, we'll show you how to solve this problem and how PHP max_input_vars
how to increase its value step by step.
max_input_vars
directive, PHP's $_GET
, $_POST
and $_COOKIE
determines the maximum number of input variables it will accept through its super global arrays. By default, this value is usually set to 1000.
However, complex forms, plugins or themes can easily exceed this limit. If this limit is exceeded, your form data may not be fully processed, your settings may not be saved or unexpected errors may occur.
php.ini
file is the core configuration file of PHP. If you have access to this file, max_input_vars
value directly.
php.ini
Find File php.ini
file location varies depending on your server and PHP installation. Common locations are:
/etc/php/7.4/apache2/php.ini
(Ubuntu/Debian, PHP 7.4, Apache)/usr/local/lib/php.ini
(cPanel)C:\php\php.ini
(Windows)If you're having trouble locating the file, you can create a new PHP file on your WordPress site and add it to <?php phpinfo(); ?>
code and run it. On the page that appears, you can see the full path to the file in the “Loaded Configuration File” line. (Don't forget to delete this file after you're done!)
php.ini
Edit File: php.ini
file with a text editor.
max_input_vars
Değerini Bulun ve Değiştirin: max_input_vars
satırını bulun (genellikle yorum satırı olarak bulunabilir, başında ;
işareti olabilir). Eğer yoksa, dosyanın herhangi bir yerine aşağıdaki satırı ekleyin:
max_input_vars = 3000; ; Increase this value according to your need (for example, 2000, 3000, 5000)
At the head ;
otherwise the line will remain as a comment and will not work. Set the value according to your needs. Setting too high a value can be an unnecessary drain on your server resources, so make sure to increase it as much as you need.
Check Other Important Settings (Optional): In the same file, post_max_size
and memory_limit
It is also useful to check your values. These values also play an important role in form submissions and file uploads. max_input_vars
and adjusting these values as needed will prevent potential problems. For example
post_max_size = 64M
memory_limit = 256M
Save Changes and Restart the Server: php.ini
save the file. You will need to restart your web server (Apache, Nginx, etc.) or PHP-FPM for the changes to take effect. control panels like cPanel usually have an interface for this process. If you are doing it from the command line, the following commands usually work (adapt according to your system and PHP version):
sudo service apache2 restart
sudo service nginx restart
sudo service php7.4-fpm restart
(change 7.4 according to your PHP version)php.ini
file or your changes are not taking effect, .htaccess
using the file max_input_vars
you can increase the value. .htaccess
file allows you to set directory-based configuration settings on the Apache web server.
.htaccess
Find File .htaccess
file is usually located in the root directory of your WordPress site (i.e, wp-config.php
directory where the file is located). If you cannot see this file, make sure that your FTP client has the setting to show hidden files turned on.
.htaccess
Edit File: .htaccess
file with a text editor.
max_input_vars
Add Value: Add the following line at the bottom of the file:
php_value max_input_vars 3000
Again, adjust the value 3000 according to your needs.
You can add other settings (Optional): .htaccess
with post_max_size
and memory_limit
You can also use the following lines to set the values:
php_value post_max_size 64M
php_value memory_limit 256M
Save Changes: .htaccess
save the file. .htaccess
file takes effect immediately, no need to restart the server.
Important Notes:
php.ini
or .htaccess
be careful when editing files. A wrong setting can cause your site to stop working. Always work with a backup.max_input_vars
value, contact your hosting provider. On some shared hosting plans, these values may be restricted and cannot be changed by you.By following these steps, you'll be able to optimize your WordPress site max_input_vars
limit and resolve form errors. Which method you use depends on your server environment and your access permissions.
In WordPress max_input_vars
error is a common problem, especially on sites that use large forms, advanced plugins or complex theme settings. This tutorial explains php.ini
or .htaccess
files, you can easily increase this limit and keep your site running smoothly. It's important to consider your server environment and access permissions to determine which method is right for you.
Remember, there may be cases where your hosting provider does not allow you to change these values, in which case contacting them would be the best solution.
If max_input_vars
If you need help increasing the value of Worgoo or are experiencing other issues with WordPress, Worgoo, WordPress Support Service can offer you professional solutions. Our team of experts is ready to optimize your site's performance and solve any technical issues you face.
Take the first step for your brand by filling out the form. Let’s create your fast, reliable, and professionally designed website without wasting any time.