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.

  • Change developerConnection with maven release plugin
  • how to know if you need to git fetch using terminal
  • Deploy a Ruby gem local without using git or internet access
  • Git - see files that have been changed, even if the changes were removed
  • How can I have grep not print out 'No such file or directory' errors?
  • GitPython get commit for a file
  • 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?

  • git rebase on long-lived (remote) feature branches
  • .bashrc is not being read by git bash for git 2.5.1
  • Is there a bi-directional bridge between p4 and git?
  • How can I show just the message for an annotated tag?
  • NodeJS Production Deployment Best Practice
  • How to convert a GIT repo to a submodule, which is nested in another (parent) GIT repo?
  • 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, http://githooks.com/ 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: http://www.fasterjoomla.com/joomla-tips/svn-per-joomla or translated by google http://translate.google.com/translate?sl=it&tl=en&js=n&prev=_t&hl=it&ie=UTF-8&u=http%3A%2F%2Fwww.fasterjoomla.com%2Fjoomla-tips%2Fsvn-per-joomla

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