Overriding php-fpm config best practice?

I want to customize these values from roles/wordpress-setup/templates/php-fpm.conf.j2:

pm.max_children = 10
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 500

Unlike nginx templates, Trellis docs doesn’t provide information about overriding these settings.

What is the best practice to change these value other than changing the file directly?


That’s the only way right now. Those values need to be converted to variables that have defaults. That would be a useful update if you’d like to do a pull request :+1:

1 Like

For those who need this immediately, merge this pull request into your trellis

Update: Already merged.


I would like to add pm.status_path = /php-fpm-status to php-fpm.conf.j2, and only for the prod config, is it possible?

This is a pretty old thread, and your question is not related to the subject the thread discusses. Questions regarding “which technology is better” are also generally outside the scope of these forms, which we try and keep focused on the Roots stack. If you have specific questions relating to the implementation of mod_php or php-form within Trellis, please create a new thread.