HCG Web Services Documentation
6 July 2009 • Version 1.0

Drupal Best Practices

These are notes concerning the Drupal development best practices that I have been able to identify, specific to our environment and processes.

Keep "core" files separate

Maintain a separation between "core" Drupal files and your site-specific files. This is best done by using the sites/ folder to store all site-specific files:

Use multi-sites to manage server levels

The way that I use to manage having a development, staging and live version of the site is to create three site folders within the sites folder each with its own settings file. The files/ directory is generally stored in the default directory and then symlinks are created to each of the other site folders.

Build Drupal modules

We've found that a common strategy that many vendors use to add functionality to Drupal is to install a parallel framework, usually at the theme level. This approach can cause a lot of problems because it often requires separate database connections and it duplicates of much of what the Drupal framework provides. We strongly recommend that you learn how to create Drupal modules and build your finctionality that way.

Keep user-generated content separate

Design your site to keep user-generated content separate in the database tables.