We may earn a referral fee at no additional cost to you when you shop through the links on this page.
You edited php.ini or a pool config, but the change isn’t taking effect, or the service won’t come back at all after a restart. This DevAnswers guide finds your exact PHP-FPM service name and reloads it without dropping live traffic (or restarts it when that is what the change needs), with Debian, Ubuntu, and RHEL commands plus the Unit not found fix.
Prerequisites
- Root or
sudoaccess on the server. - PHP-FPM already installed and serving a site through Nginx or Apache.
- A terminal or SSH session to the server.
Find Your PHP-FPM Service Name
Almost every “command does nothing” problem with PHP-FPM comes down to acting on the wrong service name. The name is not just php-fpm: on Debian and Ubuntu it carries the version number (for example php8.3-fpm), while RHEL, Rocky, and AlmaLinux use the unversioned php-fpm from their default repositories. Add-on repositories such as Remi can use different names again, so confirm yours rather than assume it.
Do not trust php -v here. That prints the version of the command-line PHP (the CLI SAPI), which is frequently different from the FPM SAPI your web server actually talks to. A box can happily run 8.1 for its websites while the CLI defaults to 8.3, so the version you see in a shell is not proof of anything. List the installed FPM units instead:
systemctl list-units --all --type=service 'php*-fpm*'
You will see the real unit name and whether it is running:
UNIT LOAD ACTIVE SUB DESCRIPTION
php8.3-fpm.service loaded active running The PHP 8.3 FastCGI Process Manager
Here the service is php8.3-fpm, so that is the name you use with systemctl below. One quirk worth knowing: the systemd service is php8.3-fpm, but the matching command-line binary reverses the order to php-fpm8.3, which is the form you use for the config test. If you run multiple PHP versions, or you are on a control panel such as cPanel or Plesk, expect several versioned FPM units side by side, one per installed version.
Reload vs. Restart: Which One You Need
Both apply changes, but they are not interchangeable. A reload sends a SIGUSR2 signal, which gracefully reloads every worker and the FPM configuration without dropping active connections. A restart stops the master process and starts it again, which can drop in-flight requests for a split second. Graceful means existing requests are allowed to finish on the old workers while new requests go to freshly spawned ones, so visitors never see a broken response.
The dividing line is what you changed. Edits to php.ini or a pool config are picked up by a reload. Installing or removing a PHP extension needs a full restart, because the extension list is only evaluated when the process first initializes.
| Situation | Use |
|---|---|
Changed php.ini or a pool www.conf | Reload |
Installed or removed an extension (e.g. php-imagick) | Restart |
| Service is wedged or workers are unresponsive | Restart |
restart only when you have added or removed an extension, or the service is stuck. Test Your Configuration First
This is the step most people skip, and it is the one that prevents an outage. A typo in php.ini or a pool file means the service will fail to come back after a restart, taking every site on it offline. Validate the configuration before you touch the running service. Use the versioned binary on Debian and Ubuntu, or plain php-fpm on RHEL:
sudo php-fpm8.3 -t
A clean configuration reports success and names the file it checked:
[04-Jun-2026 09:10:22] NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful
If there is a mistake, the output points at the exact file and line so you can fix it before anything goes down. The files it reads are the ones covered in where PHP-FPM config files live.
Reload PHP-FPM to Apply Changes
Once the test passes, reload the service to apply your php.ini or pool changes gracefully:
sudo systemctl reload php8.3-fpm
There is no output on success, which is expected. On RHEL, Rocky, or AlmaLinux the command is sudo systemctl reload php-fpm. If PHP-FPM sits behind Nginx and you also changed the web server config, reload Nginx the same graceful way after this.
Do a Full Restart
When a reload is not enough, for example after installing php-imagick or php-curl, do a full restart so the new shared objects load:
sudo systemctl restart php8.3-fpm
On older systems without systemd, use the legacy service wrapper instead, which falls back to the SysVinit script (swap in php-fpm for the service name on RHEL-family systems):
sudo service php8.3-fpm restart
Verify the Service Is Running
After a restart, confirm the service actually came back rather than assuming it did. The status command shows the current state plus the most recent log lines:
sudo systemctl status php8.3-fpm
Look for active (running) near the top:
● php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php8.3-fpm.service; enabled; preset: enabled)
Active: active (running) since Wed 2026-06-04 09:12:31 UTC; 5s ago
Docs: man:php-fpm8.3(8)
Main PID: 4821 (php-fpm8.3)
A failed state almost always traces back to a config error you would have caught with the -t test, which is exactly why that step comes first. For a script or a quick yes/no, systemctl is-active php8.3-fpm returns active when the service is healthy. If it shows failed instead, read the recent logs with sudo journalctl -u php8.3-fpm --since "5 min ago", or check the PHP error log for the underlying cause.
Fix the “Unit php-fpm.service not found” Error
This is the error that sends most people to a search engine:
Failed to restart php-fpm.service: Unit php-fpm.service not found.
It almost never means PHP-FPM is missing. It means the service name you typed does not match the unit installed on your system, usually because you used the unversioned php-fpm on Debian or Ubuntu where the unit is actually php8.3-fpm. The fix is to find your exact service name, then rerun your reload or restart with that exact name. Run the discovery command again if you need it:
systemctl list-units --all --type=service 'php*-fpm*'
Summary
The safe routine is always the same: confirm your service name, test the config, then reload by default and only restart when you have changed an extension. Swap 8.3 for your installed version in the reference below.
| Action | Debian / Ubuntu | RHEL / Rocky / Alma |
|---|---|---|
| Test config | sudo php-fpm8.3 -t | sudo php-fpm -t |
| Reload | sudo systemctl reload php8.3-fpm | sudo systemctl reload php-fpm |
| Restart | sudo systemctl restart php8.3-fpm | sudo systemctl restart php-fpm |
| Status | sudo systemctl status php8.3-fpm | sudo systemctl status php-fpm |
Hello
This command is not working here :
root@vestacp:/etc/php/7.0/apache2# service php7.0-fpm restart
Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.
Can i help me?
Thank you
root@vestacp:/etc/php/7.0/apache2# php -v
PHP 7.0.32-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.32-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
Are you running PHP-FPM? Is there an FPM folder in
/etc/php/7.0/?sudo apt-get install php-fpm libapache2-mod-php php-mysql php-curl php-xml
Reading package lists… Done
Building dependency tree
Reading state information… Done
libapache2-mod-php is already the newest version (1:7.0+49).
php-curl is already the newest version (1:7.0+49).
php-fpm is already the newest version (1:7.0+49).
php-mysql is already the newest version (1:7.0+49).
php-xml is already the newest version (1:7.0+49).
0 upgraded, 0 newly installed, 0 to remove and 376 not upgraded.
Failed to restart php7.2-fpm.service: Unit php7.2-fpm.service not found.
pluto{lyon}199: cd /etc
pluto{lyon}200: cd php
pluto{lyon}201: ls
7.0/
php -v
PHP 7.0.33-0+deb9u10 (cli) (built: Oct 6 2020 17:08:28) ( NTS )
Yes indeed, this is the correct php version.
What am I doing wrong? I must be doing something dumb.