Automating Drupal Website Configuration

There is a common problem for website developers when starting a new project, performing the same meticulous configuration process over and over again, each time.

This process includes:

  • Site installation and configuration
  • Module installation and configuration
  • Creation and settings for custom node types
  • Creation of taxonomy vocabularies and terms
  • Miscellaneous set up

Luckily, there is a solution right out of the box that is heavily supported by the Drupal community: the combination of the Install Profile API and Features module.

The Install Profile API is a set of helper functions (aka CRUD) that make it easier to work with Drupal data structures by providing some wrapper functions. This gives you the ability to create custom installation (Install Profiles). Using the Install Profile API with the Features API, we can further expand the installation and configuration capabilities.

The features module enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which, taken together, satisfy a certain use-case (ex: view a blog CCK to create a blog).

Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module. A feature module is like any other Drupal module except that it declares its components (e.g. views, contexts, CCK fields, etc.) in its .info file so that it can be checked, updated, or reverted programmatically.

In short, this combination of the Install Profiles API with the Features API gives you the ability to streamline the process of building a website in Drupal. For instance, you can have a custom installation profile, which includes a checkbox for the creation of a blog. And when you select that check box it auto generates a blog view, blog cck and a blog page.

Watch a video from DrupalCon 2010, which I shot on this very subject: (Note that the speaker is talking low during the entire session).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s