September 10th, 2014 Posted in Computer, Web Design, Web Development
WooCommerce problems saving products with lots of variations
A client recently added a product with over 100 variations to their WordPress/WooCommerce site. The product seemed to save OK with no errors, but seemed to be missing some of the variations when viewed on the front end of the site.
Long story short, it was down to a PHP variable in PHP 5.4 that limits form submissions to 1000 fields. The WooCommerce product with 103 variations was trying to submit 2000+ fields. This is not a WooCommerce or WordPress issue but rather a hosting setup issue.
Using the PHP variable manager in cPanel and setting
max_input_vars = 2000
in all folders fixed it – adding that line to php.ini manually didn’t work however.
References:
http://docs.woothemes.com/document/problems-with-large-amounts-of-data-not-saving-variations-rates-etc/
This plugin will tell you how many fields your hosting is set up for and how many WooCommerce is trying to be submit: http://wordpress.org/plugins/wp-max-submit-protect/