Skip to content

Configuration management

zzolo edited this page Nov 28, 2011 · 5 revisions

Drupal stores more than just content in its database; it stores configuration in the database as well. This makes Drupal powerful for users, as they can change how the site functions by simply changing options in the web interface. On the other hand, this causes problems for developers, specifically managing changes to this configuration, as versioning and cherry-picking from a database is difficult.

Note that this is not a huge problem when trying to replicate the production environment, as all is needed is a copy of the database, but it causes much bigger problems when working in teams, and pushing up to production.

Current Approach

There is none, really, at the moment. The current approach is documenting the necessary configuration changes, and reproducing them on production or whatever instance it is relevant to.

Hopefully

There are a couple methods to make this process more manageable.

  • Features: make it fairly simple to export and manage packages of configurations)
    • Strongarm: allows to export any site variables
  • Drupal update hooks: Drupal has built in hooks for managing database migrations. This is a pre-Features approach but is necessary for modules that neither use exportable objects known to Features, or use Drupal variables.
  • Drush Make: This manages the necessary parts of a site, such as modules and libraries. In theory we could re-create the site (minus content) with a single command.
  • Install profiles: Provides logic when installing a site, so that specific modules are installed and other logic is performed.
Clone this wiki locally