Chapter 1: Understanding Drupal

Concept: Drupal as a Content Management System

What is a Content Management System?

A content management system (CMS) is a software tool that lets users add, publish, edit, or remove content from a website, using a web browser on a smartphone, tablet, or desktop computer. Typically, the CMS software is written in a scripting language, and its scripts run on a computer where a database and a web server are installed. The content and settings for the website are usually stored in a database, and for each page request that comes to the web server, the scripts combine information from the database and assets (JavaScript files, CSS files, image files, etc. that are part of the CMS or have been uploaded) to build the pages of the website.

The combination of the operating system that the CMS runs on, the scripting language it is written in, the database it stores its information in, and the web server that runs the scripts to retrieve information and return it to the site visitor's web browser is known as the stack that the CMS runs on; the commonly used combination of the Linux operating system, Apache web server, MySQL database, and PHP scripting language is known as the LAMP stack.

What is Drupal?

Drupal is a flexible CMS based on the LAMP stack, with a modular design allowing features to be added and removed by installing and uninstalling modules, and allowing the entire look and feel of the website to be changed by installing and uninstalling themes. The base Drupal download, known as Drupal Core, contains the PHP scripts needed to run the basic CMS functionality, several optional modules and themes, and many JavaScript, CSS, and image assets. Many additional modules and themes can be downloaded from the Drupal.org website.

Drupal can also run on other technology stacks:

Other operating systems, web servers, and databases can also be made to work; however, the scripts that the software uses are written in PHP, so that cannot be changed.

What are the reasons for using Drupal?

When building a website, you have your choice of using one of the many existing CMS packages and hosted services, developing your own CMS, or building the site without using a CMS. Here are some of the reasons you might choose to use Drupal:

Additional resources

Concept: Modules

Prerequisite knowledge

Concept: Drupal as a Content Management System

What is a module?

A module is a package of files that extends Drupal's core functionality. Modules typically contain PHP code, configuration (YAML), and may include JavaScript, CSS, and Twig template files.

You can turn the features and functionality on by installing the module, and you can turn it off by uninstalling the module; before uninstalling, you may need to remove data and configuration related to the feature or functionality.

Each module that is installed adds to the time needed to generate pages on your site, so it is a good idea to uninstall modules that are not needed.

The core download provides modules for functionality such as:

You can download additional contributed modules from the Drupal.org Module Downloads, or create your own custom modules.

Additional resources

Drupal.org community documentation page "Module developer's guide"

Concept: Themes

Prerequisite knowledge

Concept: Drupal as a Content Management System

What is a Theme?

A theme is a set of files that define the visual look and feel of your site. The core software and modules that run on your site determine which content (including HTML text and other data stored in the database, uploaded images, and any other asset files) is displayed on the pages of your site. The theme determines the HTML markup and CSS styling that wraps the content.

The core software provides several basic themes with the core distribution. These themes have largely been designed and built by the community over the last several years and will all be good choices for building your first sites and becoming more familiar with how the core software works.

Drupal is a well-established CMS so the market for 3rd party themes - both free and paid - is very robust.

If none of the 3rd party options suit your needs, you'll need to create a custom theme. A custom theme can be as simple as a single CSS file that adds styling to the markup provided by the core software. Guidance for creating custom themes in Drupal can be found in the Drupal.org community documentation page "Theming Drupal".

Additional resources

Drupal.org community documentation page "Theming Drupal"

Concept: Distributions

Prerequisite knowledge

What are Distributions?

Distributions provide site features and functions for a specific type of site as a single download containing the core software, contributed modules, themes, and pre-defined configuration. A distribution makes it possible to set up a complex site for a specific purpose, in fewer steps than installing and configuring elements individually.

There are two main types of distributions:

Connecting with the Community

Additional resources

Drupal.org Drupal Distribution Downloads

Concept: Types of Data

What are the types of data?

The data and information on your site is divided up into four types, which are edited, translated, and stored differently. These four types are:

Concept: The Drupal Project

Prerequisite knowledge

Concept: Drupal as a Content Management System

What is Free and Open Source Software?

Free and Open Source Software (FOSS) is software that is developed by a community of people, released under a non-commercial license, and whose source code (the program files that make up the software) is freely available. For more information on the non-commercial license used by Drupal, see Concept: Drupal Licensing.

What is the Drupal project?

The Drupal project is a FOSS project whose purpose is to develop the core content management system software, as well as add-on modules, additional themes, translations, documentation, and special-purpose distributions. The people who contribute their time and money to the Drupal project come from all over the world, and are a diverse community that comes together for this common purpose.

The community encompasses many smaller groups who perform many different tasks such as developing a particular piece of Drupal-related software, writing documentation, maintaining the security of Drupal software, translating Drupal software into a particular language, using Drupal for some specific purpose, and coming together to meet in person within a particular geographical area.

For more on how you can connect to and communicate with the world-wide community, see Connecting with the Community and Getting Support.

What is the Drupal Association?

The Drupal Association is a non-profit organization dedicated to supporting the Drupal project and community. Its main functions are:

Additional resources

Concept: Drupal Licensing

Prerequisite knowledge

Concept: Drupal as a Content Management System

What is Drupal Licensing?

Drupal and all contributed files hosted on Drupal.org are licensed under the GNU General Public License (GPL), version 2 or later. That means you are free to download, reuse, modify, and distribute any files that are part of a project on Drupal.org under the terms of GPL version 2 or 3. You can also run the core software in combination with any code with any license that is compatible with version 2 or 3.

Drupal contributors should follow these guidelines:

Connecting with the Community

Additional resources