Why PHP runs in PHP-FPM instead of Apache

phpphp-fpmapacheops

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

Operational upside

Cost

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.