Here’s an example wordpress_sites
set up with multiple sites (some config formats out-of-date).
If/when you add a new site to wordpress_sites
, you would need to run server.yml
just for the letsencrypt
role (if you’re using Let’s Encrypt) and the wordpress-setup
role. The wordpress-setup
creates an nginx conf for your new site. You could add --tags letsencrypt
or --tags wordpress
to your command to run only these roles. Then you would need to run deploy.sh
or deploy.yml
to deploy the new site.
Running server.yml
or deploy.yml
will never destroy any sites on the server.
Explore these threads (and their links) for ideas on multiple sites with one Trellis:
https://discourse.roots.io/t/best-practice-for-multiple-sites-on-multiple-servers/5385
https://discourse.roots.io/t/one-trellis-box-multiple-sites-on-individual-vps/7784
https://discourse.roots.io/t/one-do-droplet-per-trellis-bedrock-project/4712