We have a Magento webshop version 1.9.2, and I am trying to achieve the following scenario, please advice on the best way to achieve this:

Having a local test environment, connected to a version control such as Github such that we can go backward and forward with the changes made, two things are being tried: - changing and editing the layout of the webshop, that is the looks and all the things done by the cms admin which later is stored into the database. - Installing and playing around with different extensions(We do not develope any modules or extensions ourself, we just use what is out there).

What is the best solution for such a quest?

1 Answer 1


Using source control is by far the best way there are many different approaches you can take it to handle where to revert to but I would suggest that you set up using a gitflow type workflow.


So you would have a branch: master The master branch would be come the changes you are happy with - in theory it would represent the live production server (once you go live at least).

Then for each change or idea you have you would create a new branch from master or a develop branch as an alternative.

git branch feature/homepage-view-a
git checkout feature/homepage-view-a

Now you can do your changes as you see fit, isolated in this feature/homepage-view-a branch.

If you decide it isnt what you want you can simply go back to master and start a new branch eg:

git branch feature/homepage-view-b
git checkout feature/homepage-view-b

Finally, when you are satisfied that the branch represents the change you are happy with you would merge this back into master:

git checkout master
git merge feature/homepage-view-b

At this point, master branch now represents your approved homepage-view-b changes and you can move onto your next design change.

  • But again this is only for the files, and the changes in the database stays there and does not get pushed into git. Feb 23, 2016 at 10:33
  • Normally you would bring your live database back for development environments and reflect changes that are admin dependant when you go live. Or create an install script to handle the implementation of database changes. Feb 23, 2016 at 11:42

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.