How To Change PHP Configurations in Bitnami and Make Them To Take Effects

Recently, I had to change the value of max_input_vars in php settings due to a requirement from a WordPress plugin. My site is running on EC2 server, installed by bitnami. Followed by the instructions, I went to /opt/bitnami/php/etc and edit the file php.ini.

I successfully located the line max_input_vars. Sure enough, that line was commented so the settings take its default value, 1000. I uncommented that line and set the limit to 3000.

Finally, I saved the file and restart apache.

However, still no luck. I tried to find other places where this settings could be set. After a while, I couldn’t find any other places.

What is the solution?

The solution is to run this script:

sudo /opt/bitnami/ctlscript.sh restart php-fpm

And you can guess, the limit was increased.

Conclusion

It seems that when you make changes in php.ini, you need to restart php-fpm, not apache. The system I’m working on, as mentioned at the beginning of the post, is EC2 and managed by bitnami.