Managing a Joomla website with Git?

I work at a large university and have been instructed to look in to using a source control system (git, svn, etc) to manage the websites. We use Joomla which relies heavily on MySQL.

Currently, we have a barely functional system that uses a development server which pushes to a live server whenever we change a website. It’s a pain and it doesn’t always work. Plus, we can and often do overwrite changes that another dev has made.

  • TeamCity push feature branches to master branch
  • Debug issue with Git in windows (MsysGit)
  • Make git push fail when there are uncommitted changes
  • Check-ins to TFS2013 source control triggers CI build associated with separate TFS Git Repository
  • Git permission what's the difference between file permission and special ACLs
  • git filter-branch remove all submodules from my repo
  • We want to be able to manage content via the Joomla front end on the dev branch, then push those changes to the test branch, then to the master (live) branch.

    Without getting off in tot he weeds: my question is, essentially, what is a good strategy for managing websites using a CMS like Joomla that relies on a database?

  • Remote anonymous access to repository denied?
  • Hiding Confidential Data From Git But pushing to Heroku
  • How do I create an orphan branch from the Github API?
  • Fastlane Appfile in GIT? How to retrieve current apple_id?
  • Setting up DotBot & Antigen
  • git aws.push Error
  • One Solution collect form web for “Managing a Joomla website with Git?”

    Since you also want to sync the database (content is stored in the db, while images and media are on the filesystem), you need the commit/push script to also dump the db to a file, and the pull script to load the db. This can be done with pre and post hooks, or google it.

    However there will be different parts of Joomla that you will want to sync separately.

    Let’s consider three servers:

    • edit server: where content is managed
    • dev server: where extensions are tested and configured
    • test server
    • production server

    Let’s consider three layers of information:

    1. The user and session data: this should not be synchronized at all so people are not logged out, and if any users register on the production server their login will be preserved.

    2. The contents, user groups and assets (privileges): this is the articles, news, images which have to go from edit to test to production and to dev (unless you have content-specific privileges at the user level i.e. each user has separate privileges on each content item)

    3. The template, extensions, modules, menu configurations: this will go from dev to test to production and edit.

    Each of these groups of data will require their own branch and their custom pre-commit hooks to include in the commit/push the relevant database tables. The list of tables for each group depends on the extensions you are using.

    I have written an article it’s in italian and for svn but you can grab some of the bash scripts we use: or translated by google

    Git Baby is a git and github fan, let's start git clone.