Multi-site servers tend to accumulate “temporary” exceptions. Mixed PHP versions are one of them: one site on 8.1, another on 8.2, vhosts pointing at old pools, and CLI showing yet another version. This guide helps you inventory, document, and align (or isolate) versions.
Symptoms
- One site breaks after updates; others don’t
- CLI PHP doesn’t match what the web server uses
- Vhosts point to old or wrong pools/sockets → 503/500 from socket mismatch
Why it happens
- Multiple PHP-FPM versions installed
- Old pool files never removed
- Version exceptions not documented
Fix pattern
- Inventory which sites use which PHP-FPM pools and versions
- Document it (see standardizing server docs)
- Align versions where possible; isolate where necessary
FAQ
How do I list which PHP-FPM pools exist?
Look in /etc/php/*/fpm/pool.d/ (one config per pool). The pool name and socket path are in each file. Cross-reference with Apache vhosts to see which site uses which pool.
We changed a vhost to a new pool but the site still uses the old PHP version.
Restart PHP-FPM (reload may not be enough). See PHP-FPM restart vs reload. Then confirm the vhost is pointing at the correct socket.
Related
- PHP CLI vs PHP-FPM version mismatches — CLI vs web version confusion
- Fixing Apache ↔ PHP-FPM socket mismatches — wrong socket, 503/500
- Using PHP-FPM pools per WordPress site — per-site pool layout