PHP-FPM supplies the workers and FastCGI listener behind PHP sites. systemctl controls the correct service unit, the php-fpm binary validates its configuration, and runtime and boot checks confirm the chosen action.
On systemd hosts, status shows whether the master process and pools are running, reload asks the running master to reread configuration and replace its workers, and restart replaces the master and workers. A server can have several PHP branches installed, so the unit must match the socket or port used by the site's web server.
Runtime state and boot policy are independent. A stopped PHP-FPM service can remain enabled for the next boot, while a running service can be disabled for future boots. Service control applies to PHP-FPM workers; it does not restart a separate command-line PHP script.
Steps to manage the PHP-FPM service with systemctl:
- Identify the installed PHP-FPM unit used by the site's FastCGI backend.
$ systemctl list-unit-files 'php*-fpm.service' --no-legend php8.5-fpm.service enabled enabled
Ubuntu 26.04 uses php8.5-fpm; other Ubuntu and Debian releases may use a different branch. Packages on Fedora and related distributions commonly use php-fpm. If multiple units appear, the socket or port in the web server's configuration, such as fastcgi_pass in Nginx or SetHandler in Apache, shows which branch to manage. If no unit appears, install PHP-FPM first.
Related: How to install PHP-FPM on Ubuntu or Debian - Check the selected PHP-FPM service status before making a change.
$ systemctl status php8.5-fpm --no-pager * php8.5-fpm.service - The PHP 8.5 FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php8.5-fpm.service; enabled; preset: enabled) Active: active (running) since Fri 2026-11-06 16:30:11 UTC; 13s ago ##### snipped #####For a different unit, replace php8.5-fpm throughout with that unit name. Active describes the running state; enabled or disabled on the Loaded line describes boot policy.
- Test the PHP-FPM configuration with the binary that matches the selected service before starting, reloading, or restarting it.
$ sudo php-fpm8.5 -t [06-Nov-2026 16:30:24] NOTICE: configuration file /etc/php/8.5/fpm/php-fpm.conf test is successful
On another branch, replace php-fpm8.5 with that branch's binary, such as php-fpm8.4, or use php-fpm on systems that package the unversioned binary.
Do not start, reload, or restart with a failed configuration test. An invalid pool file keeps the service from starting, and systemctl reload still exits successfully before the running service goes down. If the test fails, go straight to step 5 with the error it printed.
- Run the service action that matches the intended outcome.
Stopping PHP-FPM takes the PHP backend offline and can cause 502 Bad Gateway responses until it starts again. Restarting or reloading replaces workers and can interrupt in-flight requests. Disabling automatic startup can leave PHP sites without a backend after the next boot.
These are alternatives, not a sequence. The first four actions keep the boot policy, and enable and disable keep the running state.
Action Command Start an inactive service. sudo systemctl start php8.5-fpmStop the service. sudo systemctl stop php8.5-fpmReload configuration and workers on a running service. sudo systemctl reload php8.5-fpmRestart the master and workers, or start an inactive service. sudo systemctl restart php8.5-fpmEnable automatic startup. sudo systemctl enable php8.5-fpmDisable automatic startup. sudo systemctl disable php8.5-fpm - Review the unit journal if the service action fails.
$ sudo journalctl -u php8.5-fpm --no-pager -n 15 ##### snipped ##### Nov 06 16:30:28 php-fpm-test php-fpm8.5[359]: [06-Nov-2026 16:30:28] ERROR: [/etc/php/8.5/fpm/pool.d/www.conf:127] unknown entry 'pm.max_chlidren' ##### snipped ##### Nov 06 16:30:28 php-fpm-test systemd[1]: php8.5-fpm.service: Main process exited, code=exited, status=78/CONFIG Nov 06 16:30:28 php-fpm-test systemd[1]: php8.5-fpm.service: Failed with result 'exit-code'. Nov 06 16:30:28 php-fpm-test systemd[1]: Failed to start php8.5-fpm.service - The PHP 8.5 FastCGI Process Manager. Nov 06 16:30:28 php-fpm-test systemd[1]: php8.5-fpm.service: Scheduled restart job, restart counter is at 5. Nov 06 16:30:28 php-fpm-test systemd[1]: php8.5-fpm.service: Start request repeated too quickly. Nov 06 16:30:28 php-fpm-test systemd[1]: php8.5-fpm.service: Failed with result 'exit-code'. Nov 06 16:30:28 php-fpm-test systemd[1]: Failed to start php8.5-fpm.service - The PHP 8.5 FastCGI Process Manager.
An error line like this, or one printed by the test in step 3, names the file and line to fix; here, pm.max_chlidren on line 127 is a typo for pm.max_children. Fix that line with
sudoedit /etc/php/8.5/fpm/pool.d/www.conf, runsudo systemctl reset-failed php8.5-fpmonly if the journal says Start request repeated too quickly, then repeat steps 3 and 4. If the service is not running, use start or restart, because reload stops with is not active, cannot reload.
Related: How to find PHP configuration files - Verify the result by checking the service status again.
$ systemctl status php8.5-fpm --no-pager * php8.5-fpm.service - The PHP 8.5 FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php8.5-fpm.service; enabled; preset: enabled) Active: active (running) since Fri 2026-11-06 16:30:30 UTC; 7s ago ##### snipped #####Active shows active (running) after start, reload, or restart, and inactive (dead) after stop. The Loaded line shows enabled or disabled after enable or disable.