Using same bitbucket repo for multiple sites

Hi, everyone!
Still teaching myself development, while working on actual projects. Never got to version control, but looks like this is the time.
Got a set up where I’ve got a few identical in design and features, but different in content sites. Started with 2 sites, but now there are quite a few more of them. So, adding each new design element or feature individually, copying them via ftp client is getting tiresome.

So, I thought may be I should do following (got very little clue about how version control works, so, please bare with me):

  1. Set up a test environment with s9 on AWS (might as well try some cloud IDE since I’m at it),
  2. Connect it to bitbucket
  3. Test changes on that test AWS environment
  4. Push them to repo
  5. From repo, distribute changes across all sites.

Is there a better way to approach this? (multisite is not an option)
If my plan seems legit, where can I read up on using same repo for multiple sites in this context?

Thank you!

I don’t know WordPress very well, but if only the post-install configuration is different between the instances, then using a single repo would fit because it’s essentially just a single project used different ways.

Yes. That would be all post-install modifications. All the changes to design and features would be done through a theme (admin features can be added in functions.php).

Now, the problem is- I don’t even know what I’m looking for, when googling info on this. Could anyone please point me in the right direction?

That is really to large of a topic to discuss in a single thread. However, if you search for continuous integration pipelines for Wordpress on AWS you might get some good results.

What host are these sites currently on?

Currently, I’m on cloudways (a few sites on a few different VPS for different ip reasons). Actually pretty happy with them.
I was thinking about having only test site on AWS, and pushing working code to cloudways, once everything is working right on the test set up.

Does cloudways integrate with bitbucket?

The really quick and dirty way to version control your site is to add all the files to the repo excluding the config file. However, if you do that you will also pull in all the media individual to the site which you are using as a base. So you want to exclude any media (I forgot what folder that is in). However, when you do that you will need to determine an alternate approach to hosting the media where user content that isn’t inside the database resides on a separate server or cdn instead.There might also be some other content specific to a site which you don’t want to version control and strictly leave static and build them as part of the build process like the wp config.

They do support git. Any reason they wouldn’t work with bitbucket specifically?

Hm. It looks like I may be misunderstanding the purpose of git.
I thought I could simply use it as a code storage with changes records, being able to make directory-wide changes with a few lines of command.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.