Thursday, November 25, 2010

Drupal's Installation Profiles

What is a Drupal installation Profile?

It is a set of Drupal modules, predefined themes, configurations bundled together into a single installation. When you install this bundled installation, all the modules in it will get installed, preconfigured and you have a ready to use Drupal website. These installation profiles could cater to specific requirements that Drupal could be used to meet, like a Newspaper website, a Wiki Website, an Intranet portal, etc. Check out Drupal Installation profiles at

Components of a Drupal Installation Profile

Install profiles are located in the 'profiles' directory of a core Drupal installation. They are named profilename.profile. A profile will contain the below set of Functions:

profilename_profile_modules() - This function defines all the modules that get installed with the profile. First the Core modules are installed, followed by Contributed, followed by Custom modules.

profilename_profile_details() - This function defines the name and a short description of the Profile. The Default profile is the Drupal profile that comes with every Drupal installation.

profilename_profile_tasks() - At this stage the modules specified in profilename_profile_modules() have been installed. And you have access to the full Drupal API so you could define any custom content types, create vocabularies and terms, change variable settings to your liking, etc

We could have database updates like:

1) Set configurations (variable_set)
2) Create predefines roles and access control
3) Create preconfigured Menus
4) Create preconfigured Blocks and CCK
5) Create preconfigured content or content types
6) Configure predefine theme

This should be followed with Cache clear and Database rebuild.

1. Rebuild menu
2. Clear Cache: run cron to clear cache or write explicit cache clear code as in the systems.module in Drupal core
DONOT use drupal_flush_all_caches(): would result in all themes being disabled
3. Based on the contributed modules enabled, we must also make sure and handle any other table that requires a rebuild following their installation.

Reference: Writing a Drupal installation Profile Handbook Page

Supporter modules:
Installation Profile API
Profile Generator

Why Create Drupal Profiles?

Drupal Profiles provide a easy maintainable suite that can be replicated for multiple users. The readily available Installation Profiles in Drupal allow a quick and easy base website.

Some Good Installation Profiles:
Drupal Commons Maintained by Acquia: This Profile provides social business software providing organizations with a complete solution for forming collaborative communities.

Open Publish: a packaged distribution of the popular open source social publishing platform, Drupal, that has been tailored to the needs of today's online publishers and Newspaper companies.

Related Links:
Business models around installation profiles:
Acquia partner ship programs around Drupal distributions:

No comments:

Post a Comment

Search This Blog

Chennai Drupal Community - Community plumbing

Shyamala's Drupal SEO