disablefpm
Turn off PHP-FPM for every account and switch the server to mod_php
- Command:
/go/disablefpm - Category: PHP
- Required option: None
- Output: Nothing on success, apart from the commands it runs; an error message if it can't run
- Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Output · Examples · Troubleshooting · Details · See also
Overview
/go/disablefpm stops the server from running each account's PHP through its own PHP-FPM pool, and switches Apache to run PHP itself through mod_php. It:
- clears the PHP-FPM setting for all accounts
- rebuilds the web server configuration
- deletes the per-domain pool files for the Remi PHP versions
- restarts PHP-FPM
It works only on Apache servers on AlmaLinux, Rocky, CentOS, Red Hat, and Fedora. Nginx servers and Debian or Ubuntu servers need PHP-FPM, so the command refuses to run there.
[!WARNING] This changes every account on the server, and the deleted pool files are not backed up. Plan for a short period of errors on your sites, and test one site as soon as it finishes. With
mod_php, Apache loads a single PHP version for all sites, so per-domain PHP versions set withmultiphpno longer apply. Every site uses the server's default version (seedefaultphp). PHP also runs as the web server's user instead of each account's own user.
Quick start
/go/disablefpm
Syntax
/go/disablefpm
The command takes no options. Any arguments you pass are only recorded in the log, and they change nothing.
Run it as root. It asks for no confirmation.
Output
The command prints nothing of its own when it succeeds. Any output on screen comes from the commands it runs (conf, go, and fpm).
| Message | Meaning |
|---|---|
PHP-FPM Required By NGINX |
The server uses Nginx. Nothing is changed. Exit status 1. |
PHP-FPM Required By Debian & Ubuntu |
The server runs Debian or Ubuntu. Nothing is changed. Exit status 1. |
Examples
# Before: keep copies in case you need to go back
sudo cp -a /var/lib/sqlite/site.db /root/site.db.bak
sudo cp -a /etc/opt/remi /root/remi-backup
# Switch to mod_php
/go/disablefpm
# Check that no account still has PHP-FPM turned on
sudo sqlite3 /var/lib/sqlite/site.db "SELECT COUNT(*) FROM Site WHERE FPM=1"
# Check that Apache has a PHP module loaded
httpd -M | grep -i php
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
PHP-FPM Required By NGINX |
The server runs Nginx. | Convert to Apache with apache first, or keep PHP-FPM. |
PHP-FPM Required By Debian & Ubuntu |
These systems are not supported. | Keep PHP-FPM. |
.php files are shown as text or offered for download |
Apache has no PHP module loaded. | Check with httpd -M | grep -i php, install or enable the PHP module, then reload Apache with reload. |
| A site uses a different PHP version than before | mod_php loads one version for every site. |
Set the server version with defaultphp. |
| Permission errors appear on uploads or file writes | PHP now runs as the web server's user. | Check the file and folder permissions with fix. |
| Some pool files are still on disk | Only the pool files under /etc/opt/remi are deleted. Pools for the default PHP in /etc/php-fpm.d are not touched. |
Remove them by hand if you don't need them. |
| I want PHP-FPM back | The command can't be undone in one step. The setting is cleared for every account and the pool files are deleted. | Restore the copies you made before running it, or re-create the pools and turn PHP-FPM back on for each site. |
Details
What it does
flowchart TD
A["disablefpm"] --> B{"Web server is Nginx?"}
B -- "Yes" --> X1["Print PHP-FPM Required By NGINX, exit 1"]
B -- "No" --> C{"Debian or Ubuntu?"}
C -- "Yes" --> X2["Print PHP-FPM Required By Debian and Ubuntu, exit 1"]
C -- "No" --> D["Set FPM=0 for every site in the database"]
D --> E["Rebuild the web server configuration with conf"]
E --> F["Delete pool files in /etc/opt/remi except www.conf"]
F --> G["Run go"]
G --> H["Restart PHP-FPM with fpm"]
Steps, in order
- Appends the call to
/var/log/go/disablefpm.log. - Stops with an error if the web server is Nginx, or the OS is Debian or Ubuntu.
- Sets
FPM=0for every row in theSitetable of/var/lib/sqlite/site.db. There is no filter, so all accounts are affected. - Rebuilds the web server configuration with
conf. - Deletes every file in
/etc/opt/remi/*/php-fpm.dexceptwww.conf. These are the per-domain pool files for each installed Remi PHP version. - Runs
/go/go. - Runs
fpmwith a note that it was started bydisablefpm.
Any operating system other than Debian or Ubuntu is treated as the Red Hat family, so the command also continues on an unrecognized OS.
Side effects
- Every account's
FPMsetting is cleared. - Pool files are deleted without a backup.
- The command runs the file deletion without
sudo, so it must be run as root. - The MariaDB root password is read from the GoAdmio config but is not used.
See also
| Command | Description |
|---|---|
fpm |
Restart all installed PHP-FPM versions on your server |
multiphp |
Manage PHP versions per domain |
defaultphp |
Show or change the server's default PHP version |
conf |
Rebuild the Apache/Nginx configuration in GoAdmio |
apache |
Convert a GoAdmio server from Nginx to Apache |
fix |
Fix GoAdmio file and folder permissions |
restart |
Restart all PHP-FPM pools and the active web server |