This document explains how to resolve issues with product variations, tax rates, and other large data sets not saving in WooCommerce. These problems are typically caused by the max_input_vars PHP directive, servers running mod_security, or other server-level configuration limits. Follow the steps below to identify the cause and adjust your server configuration.
The troubleshooting steps in this document involve server-level configuration changes (php.ini, .htaccess, and server module settings). If you are not comfortable making these changes yourself, contact your hosting provider and share the specific values listed below.
Verify the issue
↑ Volver al principioBefore making changes to your server configuration, confirm that input variable limits are causing the problem.
First, check the current value of max_input_vars on your server by navigating to WooCommerce > Status. The Server environment section displays the current max_input_vars value. If this value is lower than the number of fields in your form (for example, a product with many variations), your data may be silently truncated when you save.
You can also install and activate the free WP Max Submit Protect plugin. This plugin alerts you when a form submission exceeds your server’s input variable limits. Verify that the plugin is compatible with your current version of WordPress before installing.
PHP max_input_vars
↑ Volver al principioThe max_input_vars PHP configuration directive limits the number of input variables accepted in a single form submission. It is typically set to 1000 by default. If you submit a form with more than 1000 fields (for example, a product with many variations), the data is truncated and cannot be saved.
To increase this limit, add the following line to your php.ini file:
max_input_vars = 3000
If you need to make this change via .htaccess (for example, on a shared host), use the following line instead:
php_value max_input_vars 3000
See the official PHP documentation for max_input_vars for more details on this directive.
Configure Suhosin
↑ Volver al principioSuhosin is a PHP security module found on some older or specialized hosting environments. If Suhosin is enabled on your server, you may need to increase its data submission limits. Changing Suhosin settings differs from host to host, so it is usually better to consult with your hosting provider than to attempt changes yourself. Some hosts allow you to change settings via php.ini, suhosin.ini, or .htaccess.
The following variables commonly need to be increased:
suhosin.post.max_array_index_length = 256 suhosin.post.max_totalname_length = 65535 suhosin.post.max_vars = 1024 suhosin.post.max_name_length = 256 suhosin.request.max_varname_length = 256 suhosin.request.max_array_index_length = 256 suhosin.request.max_totalname_length = 65535 suhosin.request.max_vars = 1024
After saving these changes, restart the server for them to take effect.
Shared hosting environments
↑ Volver al principioIn shared hosting environments, it may not be possible to edit php.ini. In that case, you may be able to set the Suhosin values via .htaccess:
php_value suhosin.max_array_index_length 256 php_value suhosin.post.max_array_index_length 256 php_value suhosin.post.max_totalname_length 65535 php_value suhosin.post.max_vars 1024 php_value suhosin.post.max_name_length 256 php_value suhosin.request.max_varname_length 256 php_value suhosin.request.max_array_index_length 256 php_value suhosin.request.max_totalname_length 65535 php_value suhosin.request.max_vars 1024
Consult your hosting provider’s documentation or raise a support ticket for assistance.
Non-latin characters
↑ Volver al principioIf you use non-latin characters and experience issues saving data, increase the following value from the default of 64:
suhosin.request.max_varname_length = 256
mod_security
↑ Volver al principioThe mod_security Apache module can also prevent data from saving. You may experience 503 errors if mod_security is blocking your requests. Contact your hosting provider for help resolving this issue.
Possible workarounds include the following:
- Ask your hosting provider to configure mod_security to allow the data through.
- Ask your hosting provider to disable mod_security for your site or by IP address.
- (Dreamhost only) Turn off the Extra web security setting in the control panel.
References
↑ Volver al principioThe following resource provides additional background on PHP input variable limits:
Questions and support
↑ Volver al principioDo you still have questions and need assistance?
This documentation is about the free, core WooCommerce plugin, for which support is provided in our community forums on WordPress.org. By searching this forum, you’ll often find that your question has been asked and answered before.
If you haven’t created a WordPress.org account to use the forums, here’s how.
- If you’re looking to extend the core functionality shown here, we recommend reviewing available extensions in the WooCommerce Marketplace.
- Need ongoing advanced support or a customization built for WooCommerce? Hire a Woo Agency Partner.
- Are you a developer building your own WooCommerce integration or extension? Check our Developer Resources.
If you weren’t able to find the information you need, please use the feedback thumbs below to let us know.