How to Update Trellis

23 March 2017 #Code #Tutorials

I’m a huge fan of for WordPress development but there’s one part of using the tools that doesn’t have a simple solution. Updating Trellis. There are some guides on the forums which involve Git-things I don’t fully understand, but here’s my workflow for now.

This guide should keep your local development environment’s database and files in tact, but backups are always wise to take before doing anything drastic!

  1. Make sure your VM is shut down, vagrant halt
  2. Rename your Trellis folder to something else, like trellis_old
  3. Follow the original setup docs to pull a fresh copy of the Trellis directory (don’t install Bedrock again) and run the Ansible Galaxy install
  4. Compare the Vagrantfile from your old trellis directory to the one in your new directory. If there’s been no great updates copy your old one to the new entirely. (If you’re on a multi-site install you’ll need to bring in your modifications)
  5. Change the local IP address in Vagrantfile for good measure.
  6. Copy across your wordpress_sites.yml and vault.yml files from the group_vars directories from your old directory to the new
  7. Copy across the folder hosts from your old directory the new
  8. Copy across the hidden folder .vagrant from your old directory the new
  9. Run vagrant up

Success? Hopefully!

Make sure your local development environment works with these updates. Then push everything to your Github repo.

You will then need to re-provision the staging/production environments. This may involve updating SSH or restarting the server, follow any error messages during provision for answers. Once successfully provisioned, deploy!

Latest blog posts

Photo by Chang Duong on Unsplash Guide: Tune your WordPress website and TripAdvisor to your advantage
Adventure Junky Visit Design Podcast, Episode 3
Visit Design Podcast Visit Design Podcast, Episodes 1 and 2