PHP version drift on multi-site servers

phpphp-fpmhostingops

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

Why it happens

Fix pattern

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.