---
title: "PHP-FPM"
description: "PHP-FPM is a FastCGI process manager for PHP. Learn how it runs worker pools, speeds up applications and pairs with Nginx and Apache on modern servers."
url: "https://nodea.io/en/glossary/php-fpm"
lang: "en"
updated: "2026-07-13"
---

# PHP-FPM

> PHP-FPM (FastCGI Process Manager) is a high-performance way to run PHP as a separate service that answers requests over FastCGI. It manages pools of worker processes, giving fine control over performance and resource use.

**PHP-FPM** (FastCGI Process Manager) is an implementation of the FastCGI protocol for [PHP](https://nodea.io/en/glossary/php) that manages a pool of worker processes running your application code. Instead of embedding the interpreter inside the web server process, PHP-FPM runs as a separate background service and accepts requests over a TCP or Unix socket. It is now the standard way to run PHP on production servers.

## How PHP-FPM works

PHP-FPM keeps one or more *pools* of child processes ready to serve a request the instant it arrives. The web server — usually [Nginx](https://nodea.io/en/glossary/nginx) or [Apache](https://nodea.io/en/glossary/apache) — forwards each PHP request over FastCGI to a free worker, which executes the script and returns the output. Because workers persist between requests, the repeated cost of spinning up a fresh interpreter disappears.

The process manager mode is central to tuning: *dynamic*, *static* and *ondemand* decide how many workers stay warm and how the pool grows under load. Settings such as *pm.max\_children* cap concurrent processes to protect the server from exhausting RAM, since each worker consumes up to its configured [memory\_limit](https://nodea.io/en/glossary/memory-limit). Combined with [OPcache](https://nodea.io/en/glossary/opcache), PHP-FPM delivers very high throughput.

## Practical application

PHP-FPM is the default way to serve PHP on modern VPS and dedicated servers and on most shared hosting. Separating the web server from PHP execution lets you scale each part independently: Nginx serves static assets and terminates HTTPS, while PHP-FPM handles nothing but application logic.

In practice, administrators create separate pools for different applications or users, isolating them by permissions and resource limits. A crash or traffic spike on one site then cannot starve the others. Because pool tuning maps directly to a site's traffic profile, it is one of the highest-impact optimizations on a busy PHP server, cutting response times while keeping memory usage predictable during peak hours.

### How is PHP-FPM different from mod\_php?

mod\_php embeds the PHP interpreter directly inside every Apache worker, so each web process carries PHP's memory footprint even when serving a static file. PHP-FPM runs as a standalone service reached over FastCGI, letting the web server and PHP execution scale independently. It is the more efficient, and now standard, approach — especially with Nginx.

## Related

- [PHP](https://nodea.io/en/glossary/php)
- [Nginx](https://nodea.io/en/glossary/nginx)
- [Apache](https://nodea.io/en/glossary/apache)
- [OPcache](https://nodea.io/en/glossary/opcache)
- [memory\_limit](https://nodea.io/en/glossary/memory-limit)

---

Languages: [pl](https://nodea.pl/pl/slownik-pojec/php-fpm.md)  
Site index: [llms.txt](https://nodea.io/en/llms.txt)
