2

I have been assigned to develop a site in Drupal. I will be working on it alone. Is there a need for version control? An if yes which is optimal for drupal? How should I set the development process? (ex:make a testing site locally, then get it live). Thank you in advance.

3

If you've got a complex setup, you may want to look into the Aegir project, which is a Drupal-based tool for managing Drupal site installations.

If your needs aren't big enough to require Aegir, a lot of the tasks which it does can also be automated using Drush, which is a command-line tool for managing a Drupal site.

Even if you feel Aegir is overkill, you should definitely use Drush - it will make your life a lot easier when it comes to deployment between your development and live versions and management thereafter.

As for version control: If you're writing any of your own code, then yes, you should be using version control. If you're simply using Drupal plus third-party modules, then you probably don't need it, since you're not in charge of the code anyway. But you might find it useful nonetheless, because there's always a chance you might find yourself needing to tweak a third party module (or even the core) to get things to work the way you need to, and at that point you will need version control, and it will help if you already have it set up.

You can't very easily do version control on your site content, because it's all in the Drupal database. You can do a certain amount by moving your site structure from database to code using the Features module, at which point it becomes possible to version control it in the same way as other code, but your actual content remains in the database.

To do version control on content, the main option you have is the Diff module, which allows the database to store multiple versions of page content, which can then be administered.

Hope that helps.

| improve this answer | |
  • The Aegir Project looks promising as managing sites is a task in itself as well as development. However be aware that the associated modules 'provision' and 'hostmaster' are currently only for Drupal 6. – therobyouknow Feb 14 '12 at 10:53
3

Version control is always required. The best i would say is GIT. There are multiple ways of deployment e.g. DOG(Drupal On Git) and a few others.

You can use gitflow also for deployment.

Make use of makefiles and installation profiles if you want your instance to be redistributable.

Make use of features to maintain db changes that you make on your local in sync with the staging or testing server.

Read about the above stuffs mentioned. Comment if you need any more info.

Hope this helps.

| improve this answer | |
2

I developed a few Drupal 6 and Drupal 7 sites and in my opinion the first thing you should provide to your site is a robust way to backup and restore it quickly in case of issues (especially after the site has gone live!).

To accomplish these tasks there are a couple of modules:

Backup and Migrate and Backup and Migrate Files (still in dev but functional).

Another interesting feature is the content revisions which will give you the opportunity to roll back to a previous version of a node. It is available every time you create/edit a node.

Working locally have some advantages like speed for example but I work both locally and remotely (hosted somewhere in the wild!) and trust me, it is going to happen all the time that you will need to upgrade a module or make some live changes on a prod site so my choice is again for a smooth and fast backup and restore (database and files/dirs structure) process.

good luck and happy drupaling! :)

| improve this answer | |
1

My feeling is that version control is ALWAYS needed. Even if you are working alone, and don't have to coordinate with others, the knowledge that your files are safe, and any changed can quickly and easily be rolled back, is invaluable.

So just for your own peace of mind, use VC. I use SubVersion, which has very nice integration with Windows, NetBeans (my preferred IDE) and almost everything else. There are even do-everything-for-you installers for many platforms.

To deploy, I commit from my development machine, check out to a test server, then check out the tested site to production.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy