How to switch PHP version

Switch the PHP version for an application on TurboStack in the GUI or with php_version in YAML, then verify the active 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

  1. Open the host and select the application.
  2. Go to Configure application > Technologies > PHP.
  3. Choose the version and save.
Selecting the PHP version on an application's Technologies tab
Selecting the PHP version on an application's Technologies tab

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 default php on the command line may differ from the application's version.