1

I want to add some modules in an installation profile, so that they are automatically installed during installation. Some modules need to be configured before using them.

Is it possible to do it?

2
  • Unable to understand what you want to do. Please elaborate your question. Commented Dec 1, 2014 at 9:04
  • An additional option is Drush Make drushcommands.com/drush-6x/make/make Commented Dec 3, 2014 at 0:10

3 Answers 3

6

You can create a custom installation profile

Installation profiles combine core Drupal, contributed modules, themes, and pre-defined configuration into one download. Installation profiles provide specific site features and functions for a specific purpose or type of site. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.

See How to write a Drupal 7 installation profile and the Install profile API for more info.

1

You can set up dependencies for your profile like you would for a module in YOUR_PROFILE.info.

Have a look at the standard profile included in drupal core. standard.info

If you want to make configurations upon install you can use hook_install() in YOUR_PROFILE.install

I would advice you to have a look at the profiles in drupal core for examples.

1

You could pack a group of dependencies using the Features Module.

The features module enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together satisfy a certain use-case.

Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module. A feature module is like any other Drupal module except that it declares its components (e.g. views, contexts, CCK fields, etc.) in its .info file so that it can be checked, updated, or reverted programmatically.

Under the Dependencies dropdown select the modules and even their associated settings. In this way, you can build a archive file that you can transfer to a new install and active as you would a normal module.

enter image description here

1
  • I up-voted Clive's "installation profile" answer but wanted to give another alternative. Not knowing what you fully intend to do, it's hard to give a more complete answer. Commented Dec 1, 2014 at 15:29

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.