Receiving "Input Variables Exceeded 1000" error even after updating max_input_vars

Receiving "Input Variables Exceeded 1000" error even after updating max_input_vars

July 18, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Receiving "Input Variables Exceeded 1000" error even after updating max_input_vars

Troubleshooting “Input Variables Exceeded 1000” Error in Magento

You’re experiencing the dreaded “Input variables exceeded 1000” error while working with Magento, even after updating your max_input_vars settings. Let’s dive into this issue and find a solution that works for you.

Understanding the Input Variables Limit

PHP has a built-in limit of 1000 input variables by default. This means when you have more than 1000 POST or GET variables in your script, PHP will throw an error. In your case, Magento is trying to handle thousands of related products simultaneously.

The Correct Approach: Update max_input_vars

You’re on the right track with updating the max_input_vars value. Here’s how you should do it:

  1. php.ini: Open your php.ini file and find the section where variables can be configured. Add or modify the following line:

    max_input_vars = 5000
    

    The number 5000 is a reasonable limit for most Magento sites.

  2. .htaccess: You’ve already set php_value max_input_vars 100000 correctly in your .htaccess file, which ensures the setting is applied to all .php files accessed via Apache.

  3. Restart Apache: After making changes to php.ini and .htaccess, restart your Apache server for the settings to take effect:

    sudo service apache2 restart
    

Why You’re Still Seeing the Error

If you’ve followed these steps correctly, there are a few possible reasons why you’re still encountering the error:

  1. Incorrect File Path: Ensure that both php.ini and .htaccess files are located in the correct paths:

    • php.ini is usually located in /etc/php/7.x/apache2/php.ini (adjust for your PHP version).
    • .htaccess should be placed in your Magento installation directory or a subdirectory (like app/design/frontend/your_vendor/your_theme).
  2. Caching Issues: Sometimes, changes to php.ini aren’t reflected immediately due to caching mechanisms. Try clearing any PHP opcache or APC cache files after updating.

  3. Magento Configuration: Double-check your Magento configuration for any custom settings that might be overriding the input variables limit at a lower level (like in index.php).

Additional Solutions

If increasing max_input_vars doesn’t solve the issue:

  1. Optimize Your Scripts: Review your code to minimize the number of GET and POST variables used, especially when dealing with large datasets like related products.

  2. Paginate or Load in Chunks: Instead of trying to load all 5000+ related products at once, implement pagination or chunk loading mechanisms on the frontend and backend.

  3. Consult Magento Experts: If you’re still struggling, consider reaching out to professional Magento developers for a more in-depth analysis of your specific setup.

Remember, while increasing max_input_vars is a quick fix, it’s not always the best long-term solution. Proper optimization and efficient data handling are key to maintaining a healthy and performant e-commerce site.

For more advanced troubleshooting techniques and best practices, check out our comprehensive guide on Magento Performance Optimization at Laravel Company.

Happy coding!

Catalog API Configuration Errors

Our network