MultiPHP Manager is the right tool to assign a PHP version per account, but it has a long history of looking like it worked when it did not. The most common version: the dropdown is changed, the green check appears, the customer still sees PHP 7.4 in phpinfo(). The cause is almost always a stale .htaccess AddHandler line from an older suPHP build, or a per-vhost include that was never cleaned up.
What’s happening
MultiPHP Manager writes the per-account default version into /var/cpanel/userdata/<user>/<domain> and triggers a rebuild of the Apache vhost include. The vhost ends up with a <FilesMatch> block that hands .php files to the chosen PHP version’s handler. But Apache evaluates handlers in order of specificity — a .htaccess AddHandler application/x-httpd-php72 .php in the docroot overrides everything below. cPanel cleans up its own old AddHandler directives during the change, but anything a user or a migration tool put in their own .htaccess stays.
How to verify
After the version change, confirm three things:
whmapi1 php_get_domain_php_version domain=example.com
apachectl -t -D DUMP_INCLUDES | grep example.com
grep -r "AddHandler" /home/<user>/public_html/
curl -sI -A "Mozilla/5.0" https://example.com/phpinfo.php | grep -i "x-powered-by"
If whmapi1 says the account is on PHP 8.2 but a grep -r AddHandler in the docroot finds an older handler, the user’s .htaccess is overriding the WHM-level setting.
The fix
- WHM > MultiPHP Manager > set the account or domain to the target PHP version. Watch the response for any warning about per-vhost overrides.
grep -r "AddHandler\|SetHandler\|AddType.*php" /home/<user>/to find any remaining handler directives in the customer’s tree. Remove or comment them — they almost never need to be there now that MultiPHP is doing the work.- If the customer is on PHP-FPM (not FastCGI), check
/var/cpanel/userdata/<user>/<domain>.php-fpm.yamlexists and references the same version. If it does not, runwhmapi1 php_set_vhost_versions vhost=example.com version=ea-php82. - Restart only the FPM pool for the new version, not all of Apache:
systemctl restart ea-php82-php-fpm. Apache will pick up the new socket on next request. - Test: hit a
phpinfo()file (placed by you, not by the customer, and removed immediately after). Confirm both the major.minor version and the SAPI line — you wantFPM/FastCGIorApache 2.0 Handler, matching what the WHM UI says. - If the version change is part of a bulk upgrade, script it:
whmapi1 php_set_vhost_versionsaccepts batches. Validate every domain after the run; do not assume a 200 from the API means the change is visible.
For environments where dozens of accounts move PHP versions per quarter, Stack Harbor handles the validation pass as part of cPanel server administration.