Changing PHP version in Plesk is straightforward in theory — Websites & Domains → PHP Settings → select version — but the change sometimes appears not to take effect. The site may continue running the old PHP version even after saving the new setting. This is almost always caused by a caching layer, a process that hasn’t reloaded, or the PHP version being overridden at the .htaccess or application config level. This guide walks through each cause in order of likelihood, so you can identify and resolve the issue without guesswork.
Confirm the PHP Version Has Actually Changed
Before investigating further, verify whether the Plesk setting took effect. The Plesk panel may display your new selection whilst the server continues serving pages with the old version. The most reliable check is a phpinfo() file.
- Connect to your server via SSH or open File Manager in Plesk.
- Create a file named
info.phpin thehttpdocsdirectory of the domain you changed. - Add the following single line to the file:
<?php phpinfo(); ?> - Open a browser and navigate to
yourdomain.com/info.php. - Check the PHP Version displayed at the top of the output page.
- Delete
info.phpimmediately after — leaving it in place is a security risk.
If phpinfo() reports the old PHP version, the change has not taken effect and you need to work through the causes below. If it shows the correct version but your application still behaves unexpectedly, the issue is likely within the application itself rather than the PHP configuration.
Cause 1: PHP-FPM Service Needs Restarting
Plesk uses PHP-FPM (FastCGI Process Manager) for modern PHP handling. When you change the PHP version for a domain, Plesk should automatically reload the relevant FPM pool — but this does not always happen reliably, particularly after panel updates or on busy servers.
- Connect to the server via SSH as a user with sudo privileges.
- Run the following command to force Plesk to reread and reconfigure its PHP handlers:
plesk bin php_handler --reread - If that does not resolve the issue, restart all PHP-FPM services at once:
systemctl restart 'plesk-php*-fpm' - Alternatively, restart only the specific version you are targeting. For PHP 8.1, the command is:
systemctl restart plesk-php81-fpm— adjust the version number to match your target, for exampleplesk-php82-fpmorplesk-php80-fpm. - Re-check
phpinfo()in your browser to confirm the version has updated.
If the FPM service fails to start, check the system journal for errors: journalctl -u plesk-php81-fpm --no-pager -n 50. A failed start usually indicates a misconfigured pool file or a missing PHP package.
Cause 2: PHP Version Overridden in .htaccess
On Apache-based Plesk installations, a line in .htaccess can hard-code a specific PHP version for the domain, overriding anything set in the Plesk panel. This is a common cause of the problem when a previous administrator or a hosting migration has left legacy directives in place.
Look for lines of this form in .htaccess:
AddHandler application/x-httpd-php74 .phpAddType application/x-httpd-php74 .phpAddHandler application/x-httpd-php80 .php
- Open File Manager in Plesk and navigate to the
httpdocsdirectory of the affected domain. - Enable the option to show hidden files, as
.htaccessis a hidden file on Linux. - Open
.htaccessin the editor. - Remove any line containing
AddHandler application/x-httpd-phporAddType application/x-httpd-php. - Save the file and re-check
phpinfo().
If you are managing a WordPress site, note that security plugins and migration tools occasionally write these lines automatically. Check that they have not been re-added after you remove them.
Cause 3: PHP Handler Set Incorrectly at Domain Level
Plesk supports several PHP execution modes: Apache module (mod_php), FastCGI, and FPM. Per-domain PHP version switching is only fully supported in FPM mode. If the domain is configured to use Apache module mode, the PHP version may be locked to whatever is compiled into that module, and per-domain overrides will have no effect.
- In Plesk, go to Websites & Domains and select the affected domain.
- Click PHP Settings.
- Check the PHP support dropdown — if it is set to Apache module, change it to FPM application served by Apache or FPM application served by nginx, depending on your server configuration.
- Save the change and restart the FPM service as described in Cause 1.
Switching from Apache module to FPM is the recommended approach for all modern Plesk deployments. It enables proper per-domain PHP version isolation and generally improves performance.
Cause 4: PHP Version Not Properly Installed
The Plesk PHP version dropdown can display versions that are registered in the panel but not correctly installed on the server. Selecting one of these may appear to save successfully whilst the server falls back to a working version.
- In Plesk, go to Tools & Settings → PHP Settings at the server level (not the domain level).
- Review the list of installed PHP versions. Any version with a warning icon or an error status has not installed correctly.
- To reinstall, click the version and select Reinstall, or use the Add PHP Version option to install fresh.
- On Debian and Ubuntu systems managed by Plesk, you can also install PHP packages directly:
plesk installer add --components php8.2— substituting the version number as required. - Once the installation completes without errors, return to the domain’s PHP Settings and reselect the version.
Cause 5: WordPress or Application Overriding PHP Version
Some applications enforce their own PHP version requirements at the code level, independently of server configuration. In WordPress installations, this most commonly occurs through must-use plugins or custom code in wp-config.php.
- Open
wp-config.phpin the root of the WordPress installation and check for any code that references a PHP version requirement or redirects based on PHP version. - Check the
wp-content/mu-plugins/directory. Must-use plugins load automatically and cannot be disabled from the WordPress admin. If any file in this directory enforces a PHP version, remove or edit it. - Review active plugins for any that manage PHP compatibility — these occasionally include version-locking behaviour.
This cause is less common than the others, but worth checking if your site uses a managed hosting plugin or has been migrated from a different host using an automated tool.
Checking PHP Version via SSH
Running php -v in an SSH session will show the PHP version, but this reflects the CLI (command-line) PHP version, which is configured separately from the web server PHP version. The two can differ significantly — for example, the CLI may be PHP 8.1 whilst Apache is still serving PHP 7.4 for a given domain.
To check the CLI PHP version: php -v
To confirm which PHP version Plesk is using for a specific domain’s web requests, always use the phpinfo() method described at the start of this guide. The Server API line in the phpinfo() output will also confirm whether PHP is running via FPM, FastCGI, or Apache module, which is useful for diagnosing the handler issues covered in Cause 3.
In most cases, working through Causes 1 to 3 in order will resolve the issue. PHP-FPM not reloading and .htaccess overrides are by far the most frequent culprits on active Plesk servers.
Related articles: Plesk Troubleshooting Guide