diff --git a/trellis/configuring-php.md b/trellis/configuring-php.md index 7d1ac1fa..d0f6f7d8 100644 --- a/trellis/configuring-php.md +++ b/trellis/configuring-php.md @@ -1,5 +1,5 @@ --- -date_modified: 2025-04-01 00:00 +date_modified: 2026-11-19 10:00 date_published: 2025-04-01 00:00 description: Configure PHP settings in Trellis by overriding default values. Adjust memory limits, max execution time, upload sizes, and other PHP directives per site. title: Configuring PHP Settings in Trellis @@ -15,11 +15,18 @@ If you make a change to the PHP settings, you will need to [reprovision](https:/ ::: ## Change the version of PHP +Trellis uses PHP 8.4 by default as of [#1702](https://github.com/roots/trellis/pull/1702). Older versions of Trellis default to PHP 8.3. + In [`group_vars/all/main.yml`](https://github.com/roots/trellis/blob/master/group_vars/all/main.yml), set the value of `php_version` to the version you're working with. e.g. to use PHP 8.1: `php_version: "8.1"` -As of [#1560](https://github.com/roots/trellis/pull/1560) Trellis supports 7.4 & 8.1 up to 8.4. Newer versions may work when released but may not have been tested by the community yet - you can help by testing yourself and reporting your progress on [Roots Discourse](https://discourse.roots.io/). +Trellis installs PHP from the [Sury repository](https://deb.sury.org/), and since [#1511](https://github.com/roots/trellis/pull/1511) the PHP role isn't tied to specific versions. Any `php_version` that Sury packages for your Ubuntu release will work, as long as: + +* Every extension Trellis installs has a package for that version. This covers the defaults plus `memcached`, `redis` and `xdebug` if you use them. PECL extensions such as `imagick` and `xmlrpc` are often published a few weeks after a new PHP release. +* [WP-CLI](https://github.com/wp-cli/wp-cli/releases) supports it. WP-CLI 2.12.0, which Trellis installs, supports up to PHP 8.4. + +If you try a newer version, you can help by reporting how it went on [Roots Discourse](https://discourse.roots.io/). ## Changing the default extensions Trellis will look for a version-specific override file before falling back to the default PHP extensions. If you'd like to change the extensions installed on your environments, duplicate the [`roles/php/vars/version-specific-defaults.yml`](https://github.com/roots/trellis/blob/master/roles/php/vars/version-specific-defaults.yml) file and rename it to the version of PHP you are targetting. diff --git a/trellis/installation.md b/trellis/installation.md index 472cbb40..319a97d6 100644 --- a/trellis/installation.md +++ b/trellis/installation.md @@ -1,5 +1,5 @@ --- -date_modified: 2026-11-03 10:00 +date_modified: 2026-11-19 10:00 date_published: 2015-10-15 12:20 description: Install Trellis for WordPress projects. Complete setup instructions covering requirements, dependencies, project initialization, and initial configuration. title: Installing Trellis for WordPress @@ -90,7 +90,7 @@ with a single command thanks to trellis-cli too. Trellis provisions a base Ubuntu 26.04 server by installing and configuring the following software: -* PHP 8.3+ +* PHP 8.4+ * Nginx (including HTTP/2, HTTP/3, and optional FastCGI micro-caching) * MariaDB (a drop-in MySQL replacement) * SSL support (scores an A+ on the [Qualys SSL Server Test](https://www.ssllabs.com/ssltest/))