0

I have multiple websites, that use the same Codebase, but different database instances (containing the content) and probably some additional images that are different in a given folder.

I want to manage changes from one Git location such that when I update Git, I can push the code based to all websites at once without having to log in to 100+ FTP sites while ignoring the folder that differs in content.

How do I achieve this?

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
  • Are you meaning multiple pushes? – Marcellin Wabo Jun 03 '20 at 00:19
  • Refer to [this answer](https://stackoverflow.com/questions/47177071/git-push-to-multiple-remotes) for further details. – Marcellin Wabo Jun 03 '20 at 00:26
  • 2
    If I’m reading this correctly there’s two things. First, you can’t (as far a I know) push your changes to a server that can execute them as code. So you can’t push from A to B and have B interpret that as PHP. Instead, you push to a repo and use [webhooks](https://git-scm.com/docs/githooks) on each server to listen for these pushes and do a corresponding pull. Second, you need to separate your code out so that config is not mixed in with code. See https://12factor.net/ – Chris Haas Jun 03 '20 at 00:57

0 Answers0