Understanding Drupal File Structure - DFN #2
Read time: 6 minutes
Hamad K
Apr 20, Sat

Drupal typically follows a modular and organized file structure. Here's a basic guide to navigating through Drupal's file structure as a part of our Drupal for noobs training series.
Navigating through:
Root Directory:
- The root directory will contain essential files like
index.php,.htaccess, and thewebdirectory, which is the main web root.
- The root directory will contain essential files like
Web Directory:
- The
webdirectory is the web root and contains the main Drupal files. It includes thecore,modules,themes,profiles, andsitesdirectories.
- The
Core:
- The
web/coredirectory contains the Drupal core files. You generally don't need to modify anything here.
- The
Modules:
- The
web/modulesdirectory is where contributed modules are installed. Custom modules are often placed in theweb/modules/customdirectory as a part of standard practice.
- The
Themes:
- The
web/themesdirectory contains contributed themes. Custom themes are often placed in theweb/themes/customdirectory as a part of standard practice.
- The
Profiles:
- The
web/profilesdirectory is used for installation profiles. This is more relevant for developers creating distributions or specific site configurations.
- The
Sites:
- The
web/sitesdirectory contains configuration settings, site-specific modules, themes, and files. It has subdirectories likedefaultandexample.com(whereexample.comis your site's domain). Configuration files (likesettings.php) are often placed in theweb/sites/defaultdirectory.
- The
Settings.php:
- Important configuration settings are stored in
web/sites/default/settings.php. It's crucial for database configuration, module and theme settings, and other site-specific configurations.
- Important configuration settings are stored in
Files:
- The
web/sites/default/filesdirectory is where Drupal stores uploaded files, images, and other media.
- The
Vendor:
- The
vendordirectory (outside thewebdirectory) is where Composer installs external libraries and dependencies.
- The
Temporary Files:
- Temporary files, like the Twig cache, may be stored in
web/sites/default/files/phpor a similar location.
- Temporary files, like the Twig cache, may be stored in
Video Guide: (coming soon)
In next series, we'll be covering a standard .gitignore file for Drupal projects.
Interested in Publishing your knowledge and sharing it with the world?


Or ask anything about our services
We thrive by partering with visionary brands and driven individuals.
Say hello 👋