Drupal 7 Tutorial Part 19: Understanding Drupal 7 Content Types & Fields Concepts !
Drupal 7 Tutorial Part 14: Drupal 7 File System & structure explained
In this tutorial we are going a bit deep into Drupal package and understanding the file structure of the drupal and its core components. This tutorial is very important if you are trying to figure out how to write drupal modules for customizations. This tutorial will help you understand the Drupal 7 File System and its's structure.
Let's get into the action. Go to http://drupal.org/project/drupal and download latest Drupal 7 package and unzip it. A folder will be seen once you uncompress the package. If you open the folder you will see more or like below file structure as shown in image.
- As you see in above image the drupla 7 package file system with folders and files. Let's discuss the each individual folders & files significance.
Drupal 7 Root Folders:
- Includes folders contain several files which has common functionalities shared by Drupal Core Modules. For example it contains file called form.inc which can be used in user module or node module to build forms like user login form or create content form respectively. Includes also contains Database plugins like mysql, pgsql and other.
- All drupal core modules are placed in this directory. Each folder inside modules folder is called a module and gives specific functionality. For example user module is responsible for all user related features that you see when you install drupal. Features like user login form, register form, user sessions are working from this module. Some other modules are node, block, menu etc.
- Profiles are used during installation. When you are installing drupal you see screen like below to select standard or minimal installation settings. Profiles are used to choose only specific modules while installing drupal. These will be used for Drupal Distributions when users can select specific features while installing drupal according to their requirements.
- Profiles can be compared to Custom Or Default installation instructions screen of any softwares that will be displayed during installation like the one below.
- Profiles folder contains code for different profile settings that you see during installation screen.
- Scripts folder contains shell scripts that will be used for drupal functionality. One example will be cron.sh which will be used to configure drupal cron.
- All drupal customizations goes into this folder. Like downloaded modules, custom modules, downloaded themes, custom themes are placed inside this directory. More in depth will be discussed later in my module development series tutorials in future.
- It also contains drupal settings.php file inside defaults directory which is bascially used to specify database connection settings.
- Drupal default themes that comes with drupal package are placed inside this directory.
Stay tuned with this tutorial to know more about files inside drupal root folder.