I’m a huge fan of Roots.io 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!
- Make sure your VM is shut down,
- Rename your Trellis folder to something else, like
- Follow the original setup docs to pull a fresh copy of the
Trellisdirectory (don’t install Bedrock again) and run the Ansible Galaxy install
- Compare the
Vagrantfilefrom 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)
- Change the local IP address in
Vagrantfilefor good measure.
- Copy across your
vault.ymlfiles from the
group_varsdirectories from your old directory to the new
- Copy across the folder
hostsfrom your old directory the new
- Copy across the hidden folder
.vagrantfrom your old directory the new
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!
Want more? Subscribe for updates.
Have feedback? Say hello.
If you found this post useful or have questions send me a message!