Simplifying Trellis

Originally published at:
It’s easy to get comfortable using a project. Especially one that you’ve worked on and helped to create. Which is why it’s even easier to lose the perspective of a new user. Here’s what the default config looked like for a WordPress site in Trellis as of ~3 days ago: # Documentation: wordpress_sites:…


Since I’ve actually forgotten to update all URL’s and generally leave the database names in dev the generic ones, I approve of this :100:

Actually, now I’m going to have to figure out what the underscores version of the database name is now when I need to connect to the database from PHPStorm. :eight:

@swalkinshaw amazing. These “simple” steps are going to go a long ways for bringing new people to Trellis & Roots. I love the direction you guys are going.

One question I had personally, where did the default scripts go?

For example:
wp_home: "{{ item.value.ssl.enabled | default(false) | ternary('https', 'http') }}://${HTTP_HOST}" wp_siteurl: "${WP_HOME}/wp"


db_name: "{{ item.key | underscore }}_{{ env }}" db_user: "{{ item.key | underscore }}"

I linked the PRs. You can see where they went in them: and

This may not be the place to bring this up, but I feel it’s kind of related to “Simplifying Trellis”. I’ve always struggled to find documentation / threads in relation to the host files but in particular the “type” groups such as [web] and [db] after a lot of digging into the codebase of Trellis I think I understand those types enough personally, however not enough to educate / explain to someone else.

I’m picking up new things about Ansible and Trellis continuously and if I could offer a clear clarification on the usage of these groups and types then I’d definitely put it on the table. I’m wondering if anyone else has struggled grasping the implementation of this in the hosts file? Or if I’ve not found a thread already covering this then if anyone’s aware of any links that would be appreciated

Great work on cleaning this up, the roots stack is moving mountains these past 2 weeks and as always I’m in your debt!

Funny that you just brought up hosts since I was reading about 10 minutes ago. Have you read that page? It does a pretty good explaining inventory/hosts and groups. Trellis is just using standard Ansible practices for this.

1 Like

what about when using cloudfront and I want HTTPS but without defining a SSL provider. before I would have manually sett WP_HOME to https in wordpress_sites.yml