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.

  1. I got a master site - WordPress A.

  2. 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:

  1. Setup a master Git repo with Composer to install the needed files and structure:

    • WP core
    • custom content directory
    • needed plugins
    • a master theme
  2. Setup the other sites using the same repo from #1 (the master) to get the same structure and files.

  3. 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?

  • sorry, but this is not a wordpress specific question, and therefor off-topic. In addition it is realy opinion based and answers might depend on individual style Commented Apr 30, 2016 at 3:50
  • .... and the answer (or beginning of one ;) ) is that if you know how to use git, you just branch everything and don't use child themes at all Commented Apr 30, 2016 at 3:53
  • Thanks Mark. There's only 1 master (the master is where the big changes will happen). But the individual sites got different styles etc to make them unique. But yes, I could make a new branch for all the the sites, but it just seemed to be more organized having individual repos of the childs, than packing it all into one big repo.
    – vpsnewbie
    Commented Apr 30, 2016 at 5:23

1 Answer 1


Why not use a completely separate repo for each child-theme site once its established? Clone the master repo when spinning up the environment, remove the Git directory, init a new Git repo, and push it up to wherever? Now each child theme can be developed independently of each other.

Alternatively, if you're using the same site as a base and making minor variations based on geographic location or whatever, have you considered making it a multisite? Might make it easier to maintain.

  • Yes, a child theme for each site sounds good. But if I then remove the Git directory from the master repo, then it wont fetch any new changes being made to the master.
    – vpsnewbie
    Commented Apr 30, 2016 at 5:10
  • In addition this makes the job maintaining the site twice as much work for each new child site you add - since you need to add the changed you made to master to each "child site" afterwards. A WP multisite would work if they all were in the same server, but they are spread across different servers.
    – vpsnewbie
    Commented Apr 30, 2016 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.