Two Sites, One Theme

What would be the best way to make this work?

I want to have two websites with different content at different domains (not using subdomains) but running off the same theme. I want to make sure that in future when I update one theme, both sites get the update.

I thought that if I used Multisite both sites would pull from the same git repository but from tutorials I’ve read you would create a repository for each site … but perhaps I’m being misled.

Advice appreciated.

Multisite with a domain mapping plugin sounds promising. You only upload the theme once, so my understanding is there would only be a need for one theme repo.

What’s great about modern development is that you can try it locally before doing it in the wild and there’s probably a wealth of information out there on how to accomplish this.

Okay thanks.

Can someone point to a multisite example version of a wordpress_sites.yml file? Do you define the two different sites and their domains in that file? Or just setup one ‘site’ and define the multiple sites once Wordpress is installed?

I’d say your best bet is to start here: https://roots.io/trellis/docs/multisite/

Yeah I’ve read that but I’m just not following the nature of subdomains being true or false.

If I set it to false, then where do I set the second site’s domain? Somewhere in the wordpress_sites.yml file? Or somewhere in Wordpress?

Actually I think that guide might be outdated, I see ‘hostsmanager’ but not ‘hostsupdater’

On this, I’ve got multisite working locally.

But on the server, any new site I setup on a subdomain just gives a 404. Should multisite with subdomains just work out of the box on a production server, or does it require extra editing there too?

I’m only just tinkering with subdomains myself so I’m by no means an expert, but I suspect you may need to sync databases because that’s where new subsites are actually created. I think.