I've been trying to work out the best solution to develop several WordPress sites using the following, but can't seem to decide what the best workflow would be.
I got a master site - WordPress A.
I need to setup 3 almost identical sites. Note: almost identical, so there will be some modifications to each of these sites. So I'm thinking child themes for each new site might be the way to go.
So far we're good.
But now, I need a good workflow for managing these sites using Git, and what I had in mind was something like this:
Setup a master Git repo with Composer to install the needed files and structure:
- WP core
- custom content directory
- needed plugins
- a master theme
Setup the other sites using the same repo from #1 (the master) to get the same structure and files.
Then add a child theme to each of these sites (using git submodule) since they got slightly different content based on the country they target.
Now this all seems okay, but I'm not sure its the right way to do it, or if it might cause problems.
What I'm looking for is for all sites to use the same structure and files as WordPress A, but in addition allow for changes to the other sites without affecting the master repo. I can't see any other way than using git submodules with child theme repos for each additional site.
Any suggestions?