PHP
PHP services include the CLI runtime and PHP-FPM for web requests. Choose a branch matching the project.
Available versions
8.2, 8.3, 8.4 and 8.5; 8.6 (preview) requires explicit permission. Select a CLI/FPM branch. The exact patch version depends on available packages; the branch must exist in the server repositories.
These options come from the application installation catalog. A catalog entry alone does not guarantee package availability on every server; verify the exact installed version in the service inventory.
Install
- Select PHP in services or choose its branch in an application profile.
- Allow the
packages.sury.orgPHP repository if needed; a preview branch also needs explicit permission. - Verify the inventory, CLI version and FPM status after installation.
Every offered branch uses the same installation set: CLI, FPM and BCMath, cURL, GD, Intl, Mbstring, MySQL, PostgreSQL, SOAP, SQLite, XML and ZIP extensions. XML includes DOM, SimpleXML, XMLReader, XMLWriter and XSL. Installation checks extension loading independently in CLI and FPM, then restarts FPM so existing workers load the changes.
PHP 8.2–8.5 also includes the Redis extension (phpX.Y-redis) with CLI and FPM loading checks. The supported repository currently lacks a package for PHP 8.6 preview, so that branch does not include Redis in its default set. This extension is a Redis client; the Redis server is managed separately in cache services.
Deploying a new cloud version does not add extensions to existing VMs. To add the full set, use Reinstall on the PHP service. Manually disabled extensions also require checking configuration; an installed package alone is insufficient.
Reinstallation is available for every offered PHP branch. It reads the exact installed release from the server, including its patch version, and reinstalls CLI, FPM and matching extensions. Redis has independent versioning: its installed extension version is preserved, while a missing extension is added from the available repository candidate. Modified configuration and profile ownership are preserved. Extension checks and an FPM restart follow. The operation has its own progress and result verification.
If CLI and FPM versions differ, PHP is absent, or the repository no longer provides every required package at the exact release, reinstallation stops. It does not select a newer release automatically. Refreshing repositories or failing reinstallation does not uninstall PHP or Composer.
If Composer reports missing ext-dom, check the phpX.Y-xml package for the PHP branch actually in use and verify module loading, for example with php8.4 --ri dom. Then run composer check-platform-reqs in the project directory using the same PHP interpreter. The --ignore-platform-req=ext-dom option does not install the missing extension.
PHP package source
When you allow the repository, installation uses https://packages.sury.org/php/ for the server's Ubuntu version and architecture (AMD64 or ARM64). It verifies the new source's signed metadata before changing repository settings. Installation stops if verification fails or the source is unavailable.
If the server already uses Launchpad's ppa:ondrej/php, installation replaces its entries with the new source. Existing Sury entries are also consolidated to avoid duplicates. Other repositories are preserved. The source change applies to PHP packages across the VM, including other projects.
The VM administrator decides whether to allow this change. Without permission, installation keeps the existing sources. Introducing this option in the cloud does not itself change repositories or update PHP on existing VMs. Verify the installed patch version in the inventory; package release timing depends on the repository provider.
CLI and web
The default php command may use a different branch from the website. Verify the actual binary in deployment scripts and processes.
Configure PHP mode and the matching FPM endpoint in the project web server. For applications with a public subdirectory, point the document root to that directory.
Configure
The editor offers CLI php.ini, FPM php.ini and FPM pool configuration for the branch. Changing CLI settings does not change FPM settings. Verify configuration and restart FPM through available actions after changes.
Check extensions and dependency compatibility through Composer before switching branches. Installing PHP does not create a project or its .env. Restarting FPM may briefly affect every site using that branch.
Security updates
For CVE-2026-109618 and CVE-2026-109619, including a manual SSH update procedure, see PHP: October 2026 security fixes.
A security fix stays within the current PHP branch and includes already installed, supported components and extensions. PHP-FPM restarts automatically; the confirmation also lets you select a restart of managed Nginx or Apache on the same server. After installation, the cloud verifies the version and running services automatically. See security updates for the full procedure.