How to increase the PHP Max Input Vars | WordPress Troubleshooting Guide

How to increase the PHP Max Input Vars | WordPress Troubleshooting Guide

How to increase the PHP Max Input Vars | WordPress Troubleshooting Guide | Change PHP Input Variables

  1. Method: Edit the PHP.ini file
  • Locate your PHP.ini file. If you can’t find it, you can create a new PHP.ini file in the root folder of your WordPress installation.
  • Open the PHP.ini file and search for the line max_input_vars = xx (xx represents a number).
  • Change the value to your desired limit, such as max_input_vars = 3000.
  • Save the changes and reboot your local host or server.
  1. Method: Edit the .htaccess file
  • Locate your .htaccess file, usually found in the root folder of your WordPress installation. If you can’t find it, make sure to reveal hidden files on your computer.
  • Open the .htaccess file with a text editor (e.g., Notepad or TextEdit).
  • Add the following line of code:
    yaml

php_value max_input_vars 3000

If you have the suhosin security patch, use the following lines instead:

yaml

php_value suhosin.request.max_vars 3000

php_value suhosin.post.max_vars 3000

Save the file.


If you don’t have access to PHP.ini or .htaccess file:

If you’re on shared hosting and don’t have access to these files, it’s best to contact your hosting provider and request them to change the PHP Max Input Vars value for you.

Additional considerations:

If you have correctly edited the PHP Max Input Vars value but still encounter an error, there are a couple of factors to consider:

  1. Server limitation: Your server might have a Master value that limits the Max Input Vars value. Contact your hosting provider and inquire about the Max Input Vars Master value.
  2. Suhosin library: If your server has the Suhosin library installed, it may also impose a limit on the Max Input Vars value. Check with your hosting provider to determine the Suhosin Max Input Vars setting.

Please note that these instructions assume you have the necessary permissions and access to modify the configuration files.

Share this post

Leave a Reply