Splitting PHP out of the web server is primarily a stability move. PHP runs in its own process manager (PHP-FPM), so a PHP crash or runaway script doesn’t take Apache down with it.
Benefits
- PHP crashes don’t take the web server with them
- Memory and limits enforced per pool
- Easier version isolation (e.g. different PHP versions per site)
Operational upside
- Restart PHP-FPM without dropping all HTTP connections
- Isolate misbehaving sites via per-site pools
Cost
- Slightly more config (Apache proxy + FPM pools)
- One more service to monitor
FAQ
Do I still need mod_php if I use PHP-FPM?
No. With PHP-FPM, Apache uses mod_proxy_fcgi (or similar) to forward PHP requests. mod_php is not used and can be disabled.
How does this affect MPM choice?
With PHP-FPM you’re not tied to prefork. See Apache MPM: prefork vs event for when event becomes the better default.
Related
- Using PHP-FPM pools per WordPress site — per-site isolation
- Apache MPM: prefork vs event (and PHP-FPM) — MPM in this context