Deerwalk Blog

Website development using Drupal – Cover Version control, Clean URL, Deployment

Posted by Nimesh Deuja on March 07, 2011

About Drupal

Drupal is one of the leading open-source Content Management Systems and it’s the technology that is favored by a range of numerous organizations worldwide. It is written in PHP and distributed under the GNU General Public License, which means anyone is free to download it, share it with others, and contribute changes back to the project. Drupal is an English rendering of the Dutch word “druppel”, which means “drop” (as in “a water droplet”).

Drupal can support a diverse range of web projects ranging from personal web logs to large community-driven sites. Drupal is very easy to set up and administer with much of the configuration done through the administration user interface. Drupal is frequently used for intra/inter-departmental intranet sites where individuals can post articles and other notifications rather than use email distribution lists.
With its abundant and flexible features, Drupal design is conducive for a variety of websites. Uses of Drupal include:

  • Corporate websites
  • E-commerce websites
  • Small enterprise websites
  • Private websites
  • Online publishing
  • Online magazines and newspapers and many more

Why to choose Drupal?

There are many Content Management Systems, such as Joomla, Wordpress or MODx, which have been written to do the same task as Drupal. So why do we choose Drupal for our projects over these others?

It's open source

- Drupal, like many other Content Management Systems, is open source. This means there are no license fees to use it, and the code is completely open and transparent.

Thousands of add-on features

- With more than 1,800 available modules, the vast majority of your site’s requirements can be addressed with Drupal core and available add-on modules. These modules can be modified to meet your business needs at a fraction of the cost, allowing you to focus your efforts on building great web sites.

Clear, well-documented API

- Some of our clients have specific requirements that cannot be fulfilled using core Drupal or community modules. In these instances, we often have to write custom modules to extend Drupal. Having a clear and well documented API saves both time and frustration, which translates into saving client’s money.

Revision Control

— You can configure Drupal to save a new version of your pages every time they are editing. That means that you can go back to view or revert old revisions if you want.


- Each new release of Drupal is more flexible than the last. This is due, in many ways, to the power of the API. This is not to suggest that Drupal is encumbered with many features users will never use. Core Drupal is kept slim and mean, with most of the added functionality coming by way of community modules.

Large User Community

- Drupal has a strong community of users. This means that when we encounter a situation new to use, there is usually someone who has been there before. Being able to rely on community experience (and in turn offering our experience) means much less time hacking through problems.

Responsive & Approachable Developer Community

- When bugs and security issues are found, or new features are suggested, the Drupal development community is quick to get them addressed. User feedback is sought, and the development process is very transparent.


- Drupal's codebase is very secure. A lot of care is taken to prevent opening potential exploits. On rare occasions, exploits are found. Usually, they are fixes on the same day, and a new version of Drupal with the exploit closed is made available for download. This, combined with the simplicity of keeping Drupal up-to-date, makes it secure.

Version control

A version control system (or revision control system) is a combination of technologies and practices for tracking and controlling changes to a project's files, in particular to source code, documentation, and web pages. Version control is a way of managing changes to those documents. Subversion (or other revision control systems) are really useful for maintaining sets of files and data similar to a file system. It's easy to do rapid deployment of your work across many locations with it, and it's also useful to keep track of what you've been doing (and rolling back to a better version, should you need that).

The reason version control is so universal is that it helps with virtually every aspect of running a project: inter-developer communications, release management, bug management, code stability, experimental development efforts, and attribution and authorization of changes by particular developers. The version control system provides a central coordinating force among all of these areas. The core of version control is change management: identifying each discrete change made to the project's files, annotating each change with metadata like the change's date and author, and then replaying these facts to whoever asks, in whatever way they ask. It is a communications mechanism where a change is the basic unit of information.

Clean URL

This module help modify your dynamic or static pages URLs for your site's pages that look like "" This style of URLs can be hard to read, and can prevent some search engines from indexing all the pages of your site. If you are unhappy with the default URLs in Drupal, you may be able to tell Drupal to use "clean URLs", eliminating the "?q=" in your site's URLs, and this page explains how to do it. The instructions below are largely applicable only for the most common server setup, which is an Apache web server running on some flavor of Unix/Linux, with the mod_rewrite Apache module configured and mod_rewrite enabled in httpd.conf configuration file. If you are running Drupal on a different type of server, check the links section below (just above the Comments section of this page) to see if there might be something that addresses your server configuration on a different page. This module will help you with SEO (Search Engine Optimization) for your website.

You can enable or disable it at a later time by following these steps:

  • Navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata)
  • Wait for the automated Clean URLs test to run.
  • Check or uncheck the Enable clean URLs checkbox
  • Click "Save configuration"

The standard Drupal installation contains a sample .htaccess file which supports clean URLs. It is easy to miss copying this file, because of the leading "dot". So before trying to enable Clean URLs, make sure this file exists in your Drupal installation.

Deployment Module For Drupal

Most of the site design and behavior in Drupal is controlled through configuration stored in the database (as opposed to files on the file system). The ability to move configurations from one Drupal environment to another (like development to staging to production) has been an Achilles heel for Drupal. You cannot just copy the database because then you would overwrite your production data with your test data. Assuming that you don’t want to be developing on the live site, you had to choose between manually repeating your work on the production system or resorting to some awkward SQL scripting hacks to move database stored configurations from one database to another. These scripts are always brittle because of the relations nature of Drupal’s design – it is hard to keep those ID sequences synchronized across different databases. Deploy is a welcome improvement.

This module is developed to allow developers to easily stage Drupal data from one site to another (i.e. from staging server to development server). Not only can it push new content, it can also push updates to existing content. Deploy automatically manages dependencies between nodes as well as between other objects. Deploy makes extensive use of the Services module for communicating with remote sites. Deploy will only work with Services 2.x.

Deploy requires two servers

  • A source server (which you will be deploying from)
  • A destination server (which you will be deploying to)

The deployment framework is designed to have three parts that work together:

Deployment API

- This implements the concept of a deployment plan. You create a deployment plan and add objects to it which will be deployed (content types, views, etc.) When the time comes these items are pushed to a server you specify via XMLRPC with an API key. The data stored about each item is extremely minimal, relying largely on the implementers to implement object-specific knowledge.

Deployment Implementers

- Individual modules implement the deployment API to add the data they need to a deployment plan, and expose that ability to the front end. Currently there are three deployment implementers - Content Copy, System Settings and Views.

Deployment Services

- Services modules which contain the knowledge to receive deployed data and do what is appropriate on the destination server. There are two deployment services included in this package - Content Copy and System Settings. This package also uses the Views service which comes included with the Services module, but it requires the most recent development snapshot of Services.

Drupal CMS Feature Pros and Cons


  • Extremely easy to install on any web server.
  • Has a vast community developing modules and providing technical help.
  • Has a huge amount of freely available themes to pick from.
  • Is very well adopted and maintained which means that bugs are fixed, security patches are released and new cutting edge features are always on the horizon.
  • Drupal is fast. Maybe it’s not the fastest content management system in the world but it certainly is fast. It’s very easy to set Drupal cache settings which give an immediate boost to the website.
  • It’s relatively easy to set up a website that is Search Engine Optimized aka SEO.

Like everything in life Drupal has a few cons too and they are:

  • For new users Drupal may be overwhelming somewhat chaotic and hectic. It’s still very easy to set up a theme and enter content. But you may have to scratch your head for a while how to add localization support to Drupal.
  • Drupal is quite old and even it is actively developed lot’s of it is written in procedural PHP which isn’t necessarily a bad thing, but in some way means that it’s not a top cutting edge software modeling masterpiece.
  • Even though Drupal has a huge community which develops modules for it some of the modules don’t have very good documentation. More often than not these are the less used ones. It’s not Drupal’s fault but it’s still confusing and somewhat frustrating to try and figure out where and how you can configure some module you’ve just installed.
  • Usability and learning curve: For an experienced developer it can be easy to pick up on, and quick to build with thanks to the snap-together architecture, but it can be hard to learn on. I came into it from hand-coding websites in a text editor with PHP, mySQL, and HTML and it catapulted my ability to create useful, secure sites forward. But real understanding of deeper architecture, and working with it without breaking the Drupal design philosophy (don't hack the core!), is a challenge.
  • Complexity: It's definitely too much for some projects, particularly those which have static information. Drupal is web 2.0 - it's designed to be a toolchest, and doesn't adapt well to being a box.
  • Client usage as CMS. Drupal is an excellent CMS with vast potential. It can be designed very well for non-developer clients. However, it can also be designed very badly for them. GUI interfacing is often dodgy, image handling is difficult to get right, and it does sometimes take considerable shaking to make the problems show up that might bite you later. It's not as good as Wordpress and some other more out-of-the-box CMSes at being handed over to clients; it takes more experience in the potential snags to write it for end-users.

Subscribe to Blog Updates

Posts by Topic

see all