How to switch PHP version
Each application on TurboStack runs its own PHP version in its own PHP-FPM pool, so you can change one
application's version without affecting the others. TurboStack supports a range of versions - for
example 8.4, 8.3 and 8.2. Older versions can still be installed if your application needs them,
but they may no longer receive security updates. The version dropdown lists the versions available now.
Switch it in the GUI
- Open the host and select the application.
- Go to Configure application > Technologies > PHP.
- Choose the version and save.
Switch it in YAML
Set php_version on the application (vhost). The version must be installed on the host - it is listed in
the host-level php_versions, with php_main_version as the host default. See
The Source (YAML) view.
php_version: "8.4"
Publish the change to apply it.
Verify the active version
-
Web: open a temporary
phpinfo()page (see Override PHP settings) and check the version at the top, then delete the file. -
Command line: each installed version also has its own binary at
/usr/bin/php<version>(for example/usr/bin/php8.4 -v). The defaultphpon the command line may differ from the application's version.
Warning
Test your application against the new version on a staging copy before switching a production site - a major PHP jump can break incompatible code or extensions.