Skip to content

v1.34.0

Latest

Choose a tag to compare

@retlehs retlehs released this 24 Nov 20:00
· 0 commits to master since this release

What's Changed

PHP 8.4 by default

The default php_version is now 8.4, up from 8.3. WP-CLI 2.12.0, which Trellis already pins, includes PHP 8.4 compatibility fixes, and every PHP package Trellis installs is available for 8.4 on Ubuntu 24.04 and 26.04. (#1702) @retlehs

Sites that set php_version themselves aren't affected. Sites relying on the default switch to 8.4 on their next provision, and the old phpX.Y-fpm service is stopped and disabled. To stay on 8.3, set php_version: "8.3" in group_vars/all/main.yml.

Reboot required warnings

Kernel and library updates from unattended-upgrades don't take effect until the server reboots. Provisioning and deploys now end with a warning when /var/run/reboot-required exists, listing the packages that need it and how to reboot. It only warns: it never reboots or fails the run. Skip it with --skip-tags reboot-required. (#1705) @retlehs

WordPress runtime hardening fixes

Deploys with wordpress_runtime_hardened: true now work. (#1706) @retlehs, building on #1693 by @faisalahammad

  • Deploys no longer fail with EPERM on shared/uploads
  • .env is 0640 in hardened mode so the runtime user can read it
  • Writable paths in current/ (e.g. current/web/app/cache) are made group-writable on every deploy, including directories created by wp commands during the deploy such as Acorn's cache, so Blade views and cache writes work
  • Provisioning no longer creates current as a real directory on fresh servers, which broke the first deploy
  • nginx denies direct execution of PHP files in app/cache, matching app/uploads
  • Provisioning fails early when a custom wordpress_runtime_user can't read files owned by web_group

After upgrading, provision and then deploy. See the runtime hardening docs for details, including running cron as the runtime user on Acorn sites.

Ansible facts are no longer injected as variables

Trellis now sets inject_facts_as_vars = False, the default in ansible-core 2.24, which removes the INJECT_FACTS_AS_VARS deprecation warnings. (#1707) @retlehs

If your own deploy hooks, roles or templates use top-level facts like ansible_distribution, switch them to ansible_facts['distribution']. deploy_helper.* keeps working in deploy hooks. If you run ansible-playbook directly, update your Galaxy roles with ansible-galaxy install -r galaxy.yml --force (trellis provision does this for you).

raw_vars on Ansible 2.19+

raw_vars stopped protecting vault values on ansible-core 2.19 and newer, so a deploy failed when a value such as a password under vault_wordpress_sites contained {{ or {%. It works again on all supported versions, and Trellis no longer uses the deprecated ansible.module_utils.six module. (#1694) @faisalahammad

fail2ban WordPress filters

The wordpress_wp_login and wordpress_xmlrpc filters now only match the request itself and only count failed attempts. Before, requests with wp-login.php in the Referer (like the heartbeat API or 2FA polling from an open login page) and successful logins counted as failures, which could ban admins after a normal login. (#1688) @jasperf

To apply on existing servers:

trellis provision --tags fail2ban production

Other changes

  • Skip loading opcache.so on PHP 8.5+, where OPcache is built in (#1701) @retlehs
  • Fix the ssh-keygen -R command in the host key changed message (#1704) @retlehs
  • Update ntp role to v4.0.1 (#1690)
  • Run integration tests on Python 3.15 (#1695)

Full Changelog: v1.33.0...v1.34.0