Directory Structure
Last updated on
8 August 2025
This documentation needs review. See "Help improve this page" in the sidebar.
Base-Level Directories
Every modern Drupal [ 8,9,10,11+] installation provides the following directories. Thanks to StackExchange for the original discussion.
- /recipes - The directory into which all contributed (created by community) and custom (created by you) recipes go. Recipes allow Drupal module installation and configuration automation. See Drupal Recipes for more details.
- /vendor - Third-party code libraries required by Drupal core (for example, Symfony and Twig).
- /web/core - All files required by Drupal's default usage (core), except for files that have an explicit reason to be included in the root (/) directory.
- /web/libraries - All third party external libraries leveraged by Drupal, such as a WYSIWYG editor. This folder is not included by core, but used with many contributed modules.
- /web/modules - The directory into which all contributed (created by community) and custom (created by you) modules go.
- Splitting this up into the sub-directories contrib and custom can make it easier to keep track of the modules. You can create subfolders for organization to match your development, storage, usage standards.
- /web/profile - All contributed and custom installation profiles.
- /web/sites/[domain OR default]/{modules,themes} - Site-specific modules and themes can be moved into these directories to prevent them from showing up on every site. Identical to Drupal 7.
- /web/sites/[domain OR default]/files - The storage of site-specific files. This includes files uploaded by users (such as images) and site configuration (active and staged).
- /web/themes - All contributed and custom themes and subthemes. Please note that subthemes do require the base theme to be installed here as well.
- Splitting this up into the sub-directories contrib and custom can make it easier to keep track of the themes. You can create subfolders for organization to match your development, storage, usage standards.
Core Folder Directories
The /web/core directory is organized as follows:
- /web/core/assets - Various external libraries used by core (includes jQuery, underscore, modernizer, etc.).
- /web/core/config - Base configuration for installing Drupal.
- /web/core/includes - Base functionality that Drupal uses through other /core folders.
- /web/core/lib - Drupal core classes.
- /web/core/misc - Frontend code that Drupal core depends on.
- /web/core/modules - Drupal's core modules.
- /web/core/profiles - Drupal's core installation profiles. These are Minimal, Standard, Testing and Testing multilingual installation profiles.
- /web/core/recipes - Drupal's core recipes.
- /web/core/scripts - Various command line interface (CLI) scripts, mostly used by developers.
- /web/core/tests - Drupal core tests.
- /web/core/themes - Drupal core themes.
Composer Build Directories
When using composer to download and manage your Drupal project, Drupal core and base level directories will be adjacent to a vendor directory.
- /vendor - Various external composer php packages
- /web - parent directory for the above base-level and core directories
Help improve this page
Page status: Needs review
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion