I’m researching Bedrock+Sage+Trellis workflow for WordPress development, and I have a question about remote server deployment.
Let’s say I have multiple websites developed locally on my computer using Trellis, and I’d like to deploy only one of the websites at a time to the same server. Is that possible with Trellis?
If so, how do I set up this kind of server? Are there any tutorials?
You can set up multiple sites for a Trellis server like so:
- canonical: example.com
local_path: ../example.com # path targeting local Bedrock site directory (relative to Ansible root)
- canonical: another.com
local_path: ../another.com # path targeting local Bedrock site directory (relative to Ansible root)
This is described in the docs:
When using Trellis for multiple sites note that:
- You do need to provision when you add a site to a server.
Deploys are specific to a site.
A final note: though it is possible to host multiple sites on a server, it is recommended that you stick to one site per server since that increases the security (less doors in) and improves performance (no need to share). I strongly recommend this if your sites are for separate clients, since this reduces the fallout if something goes wrong.
This topic was automatically closed after 42 days. New replies are no longer allowed.