Can the wordpress_sites key differ from the canonical domain?

Hi everyone,

I’ve started a new WordPress website using Trellis/Bedrock. The website will be a rebrand of an existing live website.

I therefore need to keep managing the existing live website for the next few months while the new website is being developed. The two projects need to coexist on the same Trellis setup without interfering with each other.

I’m still at a relatively early stage of the project, so I can make any necessary changes to the setup without too much trouble.

For the sake of this example, let’s say my existing site is:

wordpress_sites:
  example.co.uk:

For the new project, I’ve used a different wordpress_sites identifier:

wordpress_sites:
  example2026.co.uk:
    site_hosts:
      - canonical: example2026.test
        redirects:
          - www.example2026.test

The new development environment is working correctly at example2026.test, while the existing site is still using example.test.

For staging, I would like to use:

stage.example.co.uk

while the existing site is currently using:

staging.example.co.uk

My question is: is it correct to keep example2026.co.uk as the wordpress_sites key even though the actual staging hostname is stage.example.co.uk?

Or should the wordpress_sites key always match the actual domain/hostname used by that environment?

Since I’m still early in the new site’s development, I’d rather make any changes now if this isn’t the recommended approach or could cause issues in the future.

Thanks!