Greig
By:
Greig

PHP.INI - max_input_vars variable & woocommerce

November 11, 2014 3.5k views

Hi,

I'm having issues with a WP 4 install, and Woocommerce. I'm trying to set up an ecommerce site to help some friends who run a photography/framing business.

Their products have a vast number of variables - frame size, depth etc and there are >200 permutations an image can be ordered in.

As a result, woo commerce needs to be set up with variable products for all these permutations, and as I add these, the values put into the fields are not saving in the product setup.

Searching WooCommerce support, the suggested resolution is to edit php.ini to change:

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

Ive changed this variable to 6500, after the suggestion of other users. The server has been rebooted, and the apache2 service restarted.

They have also recommended installing the WP Max Submit Protect plugin, which is designed to help troubleshoot these issues.

However - on installing the plugin, it reports that the currently set value for maxinputvars is 1000 (the default) and not the 6500 I have changed this to.

Has anyone any experience with this or can suggest why the change doesn't appear to have been implemented? I still have issues saving the products.

3 Answers

The variable is commented by default -- you will need to uncomment it (delete the semicolon) for it to take effect:

max_input_vars = 6500

Also make sure the file that you're editing is /etc/php5/apache2/php.ini on Ubuntu/Debian or /etc/php.ini on CentOS/Fedora.

  • Of course that's the answer. And an idiot would have not realised that's what was going on! (that idiot is me!)

    Whoops! Thank you, it all works properly now!!

thanks @kamaln7 for your help. It was exactly what I was looking for

@Greig you said have had rebooted your server, and restarted the apache2 service.

May I ask, how can? I mean, after initializing the Console, the order: service mysql restart restart the server, but what should I write in order to restart the apache2?

Still new on this and trying to figure out how it works

Have another answer? Share your knowledge.