Increase PHP max_input_vars via web.config in IIS

admin

Administrator
Staff member
I have a simple wordpress web site under a windows hosting, I know that a Linux environment is better for wp but I need windows for another ASP.NET application. Anyway wordpress show me an error message about
Code:
max_input_vars
set to 1000 and this value should be 4000, I can't edit the
Code:
php.ini
then I would like to know if is it possible to set this value in the
Code:
web.config
, I know that in Apache it can be set in the
Code:
.htaccess
so I hope that can be done in the
Code:
web.config
as well.

Thanks in advice!

<strong>EDIT</strong>

I have found a solution: I create a
Code:
php.ini
file with
Code:
max_input_vars=4000
and I added it to wp-admin folder after that the error message disappear and checking the environment setting by PHP Settings wordpress plugin the
Code:
max_input_vars
value is 4000, I don't know if this is a best practice, but works, if someone has a better solution please explain it.

Thanks!