Topic

Modules are bundles of primarily PHP code that extend Drupal in order to add new features or alter existing functionality. Modules can be installed to enable their features, and uninstalled to turn the features off. This flexibility allows Drupal users to tailor each instance of Drupal to their specific use-case, and to use only the features of Drupal that they need. There are thousands of community-contributed modules available. A large part of learning Drupal involves learning how to locate, install, and evaluate existing modules in order to determine if the functionality they provide is what you need.

Developers can write PHP, HTML, CSS and JavaScript to create new modules when necessary. A module can provide generic functionality (for example, integrating with Twitter) with the intent of contributing it back to the community. A project-specific module can either alter existing features or contain new custom features in order to solve specific project requirements.

There are three main types of modules:

  • core modules: modules that are included with Drupal core and live in the /core/modules directory
  • contributed modules: modules downloaded from Drupal.org that are not part of Drupal core, and are typically placed in the /modules/contrib directory
  • custom modules: project-specific modules that you or another developer wrote specifically for your application, and are typically placed in the /modules/custom directory

Example tasks

  • Locate a contributed module on Drupal.org and install it on your site
  • Write a custom module for a project that adds new features or alters existing ones

Confidence

The basic concept of modules, how they are integrated into a Drupal site, and the role they play is unlikely to change, so we have high confidence in modules.

Drupalize.Me resources

More Guides

We have guides on many Drupal skills and topics.

Explore guides

External resources