Last updated September 21, 2011. Created by beginner on October 1, 2007.
Edited by nedjo, arianek, Dave Reid, kiamlaluno. Log in to edit this page.
There are a couple of Drupal projects that will help you create an installation profile.
Drush make
Drush make is a command-line packaging tool specifically designed for Drupal. It natively supports downloading, unpacking, and installing Drupal modules and themes via a simple configuration file (the 'make' file), and a single command. Drush make is the tool used by the drupal.org packaging system to create packaged install profiles, and is a very useful tool to have in your local development environment for generating, formatting, and verifying .make files you'll eventually commit to your profile.
Installing Drush make in your local workspace
- Download the latest stable version of Drush. Follow the instructions in the README.txt to install it for your platform.
- Download the latest stable version of Drush make. Follow the instructions in the INSTALL.txt to install it for your platform.
- Open a terminal, and enter the following command:
drush help make
If there are no errors, then Drush make is installed and working.
Verifying a drupal-org.make file with Drush make
If you want your installation profile fully packaged by drupal.org, you create a drupal-org.make file in your profile directory. However, you should test this file before you commit it and tag a release, to ensure that it will be packaged correctly. Once you have drush make installed, here's how to verify your drupal-org.make file:
Via the drupal.org web tool
- Visit the project home page for the profile, ex. http://drupal.org/project/drupalorg_testing
- Click the 'Verify release .make files' link in the release link section.
- Paste the contents of the .make file to be verified in the provided text area.
- Click 'Verify'
- The results page will indicate if the verification was successful or not, and include an error report if any are found.
Via the command line
- Open a terminal
- Change to the directory that contains the
drupal-org.makefile. - Run the following command:
drush verify-makefile drupal-org.makeNote: if you're running an older version of drush make, you may need to run this command instead:
drush verify makefile drupal-org.makedrupal-org.makeis the name of your .make file. This command will verify all of your Drupal release and the releases for all projects in thedrupal-org.makefile, and report any errors it finds.
Features
The Features module is increasingly the core of install profiles, providing tools for creating diverse types of configuration, from content types and fields to views and user permissions.
Subprofiles
The Subprofiles module can be used to provide different "flavours" of your install profile, consisting of different sets of features.
Profiler
The Profiler module provides a number of tools for building profiles and also allows you to have 'Sub' Install Profiles, where one Install Profile inherits from and extends another Install Profile.
Install Profile API
If you're writing a profile for Drupal 5 or 6, you can make use of the Install Profile API, which provides a set of helper functions that make it easier to create, update, or delete elements from Drupal's data structures. You will still have to be familiar with PHP; this is not an "end user" module.
Profile Generator
Drupal 5 users can get a huge jump-start on an installation profile by using the Profile Generator module to create a profile for an existing site.
Ideally, you install Drupal and selected contributed modules as usual, configure the site, and add generic content until your site is just as you want a new site to look. Then you activate Profile Generator to create a profile which replicates your site.
In practice, you will almost certainly have to do some manual tweaking of the installation profile functions. At the very least, you probably want to remove the code that installs Profile Generator (A line referring to profile_generator in the _profile_modules hook.)
(There used to be an alternative to Profile Generator: The Profile Wizard component of the Install Profile API project (described above). But the Profile Wizard has since been deprecated.)
See Groups.Drupal.org/Distributions for ongoing discussion about installation profiles.