Trellis Save

WordPress LEMP stack with PHP 8.1, Composer, WP-CLI and more

Project README


MIT License Release Build Status Follow Roots

Ansible-powered LEMP stack for WordPress

Website    Documentation    Releases    Support


Trellis is an open source project and completely free to use.

However, the amount of effort needed to maintain and develop new features and products within the Roots ecosystem is not sustainable without proper financial backing. If you have the capability, please consider sponsoring Roots.

Sponsor Roots

KM Digital Carrot Pantheon Worksite Safety


Ansible playbooks for setting up a LEMP stack for WordPress.

  • Local development environment with Vagrant
  • High-performance production servers
  • Zero-downtime deploys for your Bedrock-based WordPress sites
  • trellis-cli for easier management

What's included

Trellis will configure a server with the following and more:

  • Ubuntu 20.04 Focal LTS
  • Nginx (with optional FastCGI micro-caching)
  • PHP 8.0
  • MariaDB (a drop-in MySQL replacement)
  • SSL support (scores an A+ on the Qualys SSL Labs Test)
  • Let's Encrypt for free SSL certificates
  • HTTP/2 support (requires SSL)
  • Composer
  • WP-CLI
  • sSMTP (mail delivery)
  • MailHog
  • Memcached
  • Fail2ban and ferm


See the full installation docs for requirements.


Create a new project:

$ trellis new

Local development setup

  1. Review the automatically created site in group_vars/development/wordpress_sites.yml
  2. Customize settings if necessary

Start the Vagrant virtual machine:

$ trellis up

Read the local development docs for more information.

Remote server setup (staging/production)

A base Ubuntu 18.04 (Bionic) or Ubuntu 20.04 (Focal LTS) server is required for setting up remote servers.

  1. Configure your WordPress sites in group_vars/<environment>/wordpress_sites.yml and in group_vars/<environment>/vault.yml (see the Vault docs for how to encrypt files containing passwords)
  2. Add your server IP/hostnames to hosts/<environment>
  3. Specify public SSH keys for users in group_vars/all/users.yml (see the SSH Keys docs)

Provision the server:

$ trellis provision production

Or take advantage of its Digital Ocean support to create a Droplet and provision it in a single command:

$ trellis droplet create production

Read the remote server docs for more information.

Deploying to remote servers

  1. Add the repo (Git URL) of your Bedrock WordPress project in the corresponding group_vars/<environment>/wordpress_sites.yml file
  2. Set the branch you want to deploy (defaults to master)

Deploy a site:

$ trellis deploy <environment> <site>

Rollback a deploy:

$ trellis rollback <environment> <site>

Read the deploys docs for more information.

Migrating existing projects to trellis-cli:

Assuming you're using the standard project structure, you just need to make the project trellis-cli compatible by initializing it:

$ trellis init


Keep track of development and community news.

Open Source Agenda is not affiliated with "Trellis" Project. README Source: roots/trellis
Open Issues
Last Commit
2 weeks ago

Open Source Agenda Badge

Open Source Agenda Rating