Entity view (Content)

Drupal and SVN

By jwhang
Oct. 7, 2009

Alot of our clients tend to ask how we would manage sites across multiple servers or how we would maintain the code on the live site to make sure it is identical to the development environment. For our purposes, svn has served us very well and that is our general practice here for all our projects. Personally I find the interfaces (both gui and command line) to be quite intuitive. It is an invaluable tool in our development process and makes the job much easier, especially when clients request multiple deployments of the same site over different servers. The trick is maintaining the Drupal database but that in itself is a whole other post. Installing svn on DEB based servers (ubuntu, Debian) uses this command

apt-get install subversion

while redhat servers use

yum install subversion

and the command to create the repository is simply

svnadmin create repository_name

you will find a list of commands by typing in svn help if you are using command line or you can download an svn client(windows users) if you are more comfortable with a User Interface approach. Tortoise is a popular client and one that we use here. All that is left at this point is enabling the user privileges which is largely dependent on the amount of security you have on your server. You will have to allow certain users to checkout of the repository as well as check in, both of which are generally done over ssh, which is the most secure protocol available. As a general practice, we include the entire drupal installation minus the "files" folder and "settings.php" file which both have to be maintained/moved/created manually I do not have experience with cvs so if it out performs svn an any way, I would be interested to know how.

Post Tags: