I am trying to create a custom installation profile for small internal usage and I'd like to hide certain steps and also implement new functions as a quick-and-dirty way to pre-populate some default content (nodes, blocks, menus) and configuration settings (wysiwyg) by inserting them into the database during the profile installation.

I am using the standard profile as a guide to work from as well as following this guide, but having trouble getting this to work smoothly and since it's all pre-installation I can't use devel to troubleshoot (it's not enabled yet).

Let's call the custom installation profile customprofile and the files I have are:

  • customprofile_profile.info
  • customprofile_profile.profile
  • customprofile_profile.install

I've figured out (for example) how to override the "Select locale" step and hard-code that to be English in customprofile_profile.profile:

function customprofile_install_tasks_alter(&$tasks, $install_state) {
  $tasks['install_select_locale']['display'] = FALSE;
  $tasks['install_select_locale']['function'] = 'customprofile_select_locale';

function customprofile_select_locale (&$install_state) {
  $install_state['parameters']['locale'] = 'en';

...but I haven't been able to track down the syntax for:

1) inserting a new step at the end of the profile install

2) inserting some SQL (I found this old post but it seems to be for Drupal 6 and both the profile syntax and SQL insertion are incompatible with Drupal 7)

Any guidance for next steps on either/both of these would be appreciated!

1 Answer 1


You might find drush-make useful, especially if you already have a codebase setup that you would like to replicate. As outlined in this blog post:

Drush Make includes 2 commands which are already built in Drush itself:

  • make — Turns a .makefile into a Drupal codebase.
  • make-generate — Generates a .makefile from the current Drupal site.

Both commands are related to a .makefile — flat text file with Drush Make instructions. You can read more about .makefile syntax here.

  • It looks like it would be useful to learn more about drush-make, but unless I'm missing something it doesn't seem to help with the default content/config portion, right?
    – Laryn
    Nov 21, 2014 at 3:06
  • Ah no, just codebase, you can create content/config defaults using the Features module I believe.
    – Darvanen
    Nov 21, 2014 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.