Change max_input_vars from 1000 to 5000

Hello guys!

I need a little help, please! I’m trying to change max_input_vars from 1000 to 5000 I did this through php.ini. But it had no effect on wordpress in my wordpress continues with 1000.

Remembering that I did the server reboot. But still nothing changes. Other editions work normally I’m just having problems with max_input_vars.

edit path: etc/php/7.0/cli

Thanks in advance for your help!

The correct path to the file you need to edit/update is

sudo nano /etc/php/7.0/fpm/php.ini

find max_input_vars and change it. Then finally restart php-fpm service via

sudo service php7.0-fpm restart

In the path you passed me there is no max_input_vars option. It is only found in etc/php/7.0/cli/php.ini in my installation.

It’s OK, try to add it in this file and see if it has any effect on it. Don’t forget to restart the php7.0-fpm process. I forgot to ask are you using EasyEngine to manage your sites?

Yes, I use easy engine. when you say to add in this file what would it be? is to put in the (php.ini) of cli or fpm. If it is in the cli it already exists there and did not provide any change.

And if it’s in fpm I have to put all this text:

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

Or just:

max_input_vars = 5000


not in cli, in php.ini, just edit this file like this:

sudo nano /etc/php/7.0/fpm/php.ini

and add

max_input_vars = 5000 under first [PHP] section. Save the file.

Then do

sudo service php7.--fpm restart

And you should be able to see that max_input_vars has changed.

Unfortunately nothing has changed! The code is still saved in php.ini but did not update on the site.

My website!

Nothing changed because you didn’t restart the php-fpm process/service. I made a typo in the last command, it should be:

sudo service php7.0-fpm restart

Try again.

1 Like

Thank you so much now it really works!