Guide en
Guide en
This guide was written mainly for people with minimal knowledge of the Drupal content management
system. The topics will help them become skilled at installing, administering, site building, and/or maintaining
the content of a Drupal-based website. The guide is also aimed at people who already have some experience
with a current or past version of Drupal, and want to expand the range of their skills and knowledge or update
them to the current version. The guide is kept up-to-date with the current major version of the core software.
Currently Drupal 10.
i
Contents
Preface vii
Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Audience and Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Reporting Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Conventions of the Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Guiding Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1 Understanding Drupal 1
1.1 Concept: Drupal as a Content Management System . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Concept: Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Concept: Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Concept: Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Concept: Types of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 Concept: The Drupal Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.7 Concept: Drupal Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Installation 19
3.1 Concept: Server Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2 Concept: Additional Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 Concept: Methods for Downloading and Installing the Core Software . . . . . . . . . . . . . . . . 22
3.4 Preparing to Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.5 Using Composer to Download and Update Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.6 Downloading the Core Software Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.7 Running the Interactive Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
iii
CONTENTS
8 Blocks 125
8.1 Concept: Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
8.2 Creating A Custom Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
8.3 Placing a Block in a Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
iv
CONTENTS
15 Glossary 213
A Appendix 221
A.1 Guide-Wide Attributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Index 223
v
Preface
Copyright
This guide was written by contributors to the Drupal open-source project. It is copyright 2015-2024 by the indi-
vidual contributors, and can be used in accordance with the Creative Commons License, Attribution-ShareAlike
2.0 (CC BY-SA 2.0). Each page in this document (including this one) has an Attributions statement at the bot-
tom, listing the people who contributed to writing and editing that page. See also Section A.1, “Guide-Wide
Attributions” for guide-wide editing, translating, and project management information.
The CC BY-SA license (very similar to the GPL) allows anyone to copy, modify, and redistribute modifica-
tions of all or part of this work, as long as the following is complied with:
• You provide appropriate credit (see the license for more information).
• You provide a link to the license.
• You indicate whether changes have been made.
• You distribute your work under the same license as this original.
Attributions
This page was adapted and edited by Jennifer Hodgdon, and Jojy Alphonso at Red Crackle, from ”Documen-
tation copyright and licensing”, copyright 2000-2024 by the individual contributors to the Drupal Community
Documentation.
Copyright notice: Copyright 2015-2024 by the individual contributors; see the section called “Copyright”
for details. Licensed under CC BY-SA 2.0.
vii
PREFACE ORGANIZATION
• Understand documentation and blog posts on topics not covered here, to expand your knowledge and
skills
Organization
This user guide contains a series of topics, each of which covers either a task (how to do something) or a concept
(background knowledge, terminology, and the like). Concept topics have names starting with Concept:, while
task topics have names containing verbs, like Editing Basic Site Information.
The topics are grouped into chapters in a logical order, with concepts and tasks interleaved so that concepts
are presented before related tasks, and tasks build on each other. To take advantage of this, you are encouraged
to read the entire guide in its presented order, possibly skipping topics that are not of interest or that present
information you already know. Remember to try out the tasks on your own site as you read the guide; most
people learn better by doing rather than reading.
If you prefer, you can also use the index or table of contents to jump straight to a topic that you’d like to learn
about, rather than reading the entire guide. To facilitate this approach, each topic lists the prerequisite knowl-
edge that you’d need in order to understand it, if any (with links to the topics that present that knowledge);
task topics also list site prerequisites (things that you would need to have configured or created on your site in
order to perform the task). Also, most topics have sections at the end where you can find related information
and/or tasks for expanded understanding, to continue your learning.
You may also want to refer to the Glossary section as you read — it gives brief definitions of most of the
terminology used in the guide, with links to topics having more detailed explanations.
Attributions
Written by Jennifer Hodgdon.
Reporting Problems
Goal
Report a problem with this guide, such as:
• Information that is incorrect or does not follow best practices
• Broken links
viii
PREFACE CONVENTIONS OF THE GUIDE
Steps
1. Make a note of the topic or topics that contain the problem you have found.
2. Log in to Drupal.org (you will need to create a user account if you do not already have one).
• If there are only a few open issues, scan the Summary column to see if any of their descriptions match
the problem you found. You may also need to read some of the issues to make sure, which you can
do by clicking the links in the Summary column.
• If the open issue list is long, enter either a keyword related to the problem you found or the title
of the topic where the problem occurs in the Search for box, and click Search to reduce the issue list.
Then either scan the summaries or read the issues to see if they match your problem.
5. If you determine that your problem has not already been reported, click Create a new issue, and fill in the
issue report as follows:
6. Reread the Title and Issue summary you entered, and verify that the following information is included in
your report:
Attributions
Written by Jennifer Hodgdon.
ix
PREFACE CONVENTIONS OF THE GUIDE
• This guide is organized into topics; see the section called “Organization” for details. Many topics include
a Prerequisite knowledge section, which lists other topics whose content knowledge is needed in order to
understand the topic you are reading. Some background knowledge that is not covered in the guide is
also assumed; see the section called “Audience and Goal” for details.
• Many task topics list Site prerequisites, which are tasks that you’ll need to have completed on your site
before you’ll be able to do the task in the topic you are reading.
• The specifics of the site prerequisites relate to the scenario used throughout this guide of building a site
for a farmers market (see the section called “Guiding Scenario” for details). You can adapt the tasks to
your own scenario, but you will also need to remember the changes you made when deciding if your site
satisfies the site prerequisites for a task.
• For all task topics after Section 3.7, “Running the Interactive Installer”, there is also an implicit prerequi-
site: you must have installed the latest stable version of the content management software on your site,
and be logged in to a user account with sufficient permissions to do the task (such as the user account
created when you installed your site, which automatically has full permissions).
• If you read all the topics in order, and perform all of the steps in the task topics as you go (staying logged
in), you should have the background knowledge and site prerequisites in place for each topic as you read
it.
• This guide demonstrates how to perform tasks using the administrative user interface, and wherever
possible, also using the latest stable version of the Drush command-line tool (see Section 3.2, “Concept:
Additional Tools”). You can feel free to use a different command-line tool, such as Drupal Console (if
you look up equivalent commands), or to only use the administrative interface for now.
Text conventions
The following conventions are used in the text of this guide:
• The URL example.com means the base URL of your website. See the Navigation section below for more
details on how URLs internal to your site are indicated.
• Text you should see in the user interface of your site is shown in italics, such as: Click Save configuration.
This only applies to text in the user interface that comes from the software, not to text that was entered
in a previous topic. For example, in a topic about editing, you might see this instruction: Click Edit in the
row of the About page (Edit would be in italics, but About would not be, because the About page was
created in a previous topic).
• URLs, file names, and newly-introduced terminology are also shown in italics.
• Text that you should type at a shell command line is shown in monospace type, such as:
drush cache:rebuild
• Within this guide, the word directory is always used to refer to file directories (which some people prefer
to call folders).
Navigation
To do most of the task topics in this guide, you will need to navigate to one or more pages in the administrative
interface of your site. You might see something like this in the instructions (this will make more sense after
you have the base software installed):
In the Manage administrative menu, navigate to Structure > Taxonomy (admin/structure/taxonomy).
Navigation instructions like this assume that you have the core Toolbar module installed, and this ex-
ample means that in the menu bar at the top of your site, you would need to click Manage to expose the
menu choices, then click Structure, then Taxonomy, and that at the end, you would be on a page with URL
http://example.com/admin/structure/taxonomy (if your site base URL is http://example.com).
x
PREFACE GUIDING SCENARIO
One other note: if you are using the standard administrative core Seven theme, many ”Add” buttons in
the administrative interface are displayed with + signs on them. For instance, on admin/content, the Add new
content button appears as + Add new content. However, this is theme-dependent and is not really part of the text
on the button (for instance, it would not necessarily be read by a screen reader), so in this guide, the convention
is to not mention the + sign on the buttons.
Filling in forms
Many of the task topics in this guide include steps where you will fill out a web form. In most cases, a screen
capture image of the form will be included, along with a table of the values you will need to enter into each
form field. For example, you might see a table that starts out like this, explaining the site information form you
would see if you navigated to Configuration > System > Site information (admin/config/system/site-information):
To use this table, find the field labeled Site name in the section that is under Site details in the form, and enter
the name of your site in this field. An example site name of ”Anytown Farmers Market” is suggested in the
table, which relates to the scenario of building a website for a farmers market that you’ll find all through this
guide (see the section called “Guiding Scenario” for details). Also note that on some forms, you might have to
click a section title (like Site details in this example) to expand the section and find the field it contains.
Attributions
Written/edited by Jennifer Hodgdon.
Guiding Scenario
When reading this guide, it is helpful to have a website building project in mind. The following project scenario
provides context and links together the examples in this guide:
xi
PREFACE GUIDING SCENARIO
You are making a website for a farmers market. The site needs to display information about the location
and hours of the market, and an About page with the history of the market. It also needs to list the vendors.
Vendors should be able to edit their listings (including a logo or photo), and post recipes. Site visitors should
be able to browse recipes, or locate recipes using ingredients that they purchased at the market. Some visitors
to your site speak another language, so the main pages and vendor pages need to be translated.
As you read through the guide and try out the tasks it describes, you may choose to follow the scenario ex-
actly; you could also modify the tasks to suit your purposes. If you do want to follow the scenario exactly, you’ll
find that you need some image files, which are located in the assets directory of the .zip or .tgz file download
available on the User Guide project page.
Attributions
Written/edited by Jennifer Hodgdon.
xii
Chapter 1
Understanding Drupal
What is Drupal?
Drupal is a flexible CMS based on the LAMP stack, with a modular design allowing features to be added and re-
moved 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:
• The operating system can be Windows or Mac OS instead of Linux.
• The web server can be Nginx or IIS instead of Apache.
• The database can be PostgreSQL or SQLite instead of MySQL, or a MySQL-compatible replacement such
as MariaDB or Percona.
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.
1
CHAPTER 1. UNDERSTANDING DRUPAL 1.2. CONCEPT: MODULES
• Building a small, simple site with static HTML pages is not difficult, and you can get a simple site up very
quickly. Setting up a site in a CMS generally requires more time initially, but brings you the benefits of
on-line editing (easier for less experienced content maintainers), uniformity (harder to maintain using
static HTML for larger sites), and the possibility of more complex features requiring a database.
• Some CMS software is special-purpose; for instance, there are packages and hosted services that you can
use to build a blog or a club membership website. Drupal, in contrast, is a general-purpose CMS. If you
are building a special-purpose site, you might choose to use a special-purpose CMS; however, if your site
falls even slightly outside the intended purpose, you will probably be better off using a general-purpose
CMS rather than trying to adapt a special-purpose CMS.
• Building your own CMS-type software can seem attractive. However, using a general-purpose CMS like
Drupal as a starting point is usually a better idea, because the basic CMS functionality (such as user
accounts and content management) has thousands of developer hours behind it, including many years
of user testing, bug fixing, and security hardening.
• Some CMS software packages are expensive to purchase a license for. Some are free or have a free version,
but have restrictive licenses that do not allow you to make modifications and extensions. You might prefer
to use a package (like Drupal) that has a less restrictive software license, and is developed by a world-wide
community. See Section 1.6, “Concept: The Drupal Project” for more on this topic.
Related topics
• Section 1.2, “Concept: Modules”
Additional resources
• Drupal.org community documentation page ”Understanding Drupal: Overview”
Attributions
Written and edited by Kristof van Tomme at Pronovix, Jennifer Hodgdon, and Michael Lenahan at erdfisch.
2
CHAPTER 1. UNDERSTANDING DRUPAL 1.3. CONCEPT: THEMES
What is a module?
A module is a set of PHP, JavaScript, and/or CSS files that extends site features and adds functionality.
You can turn the features and functionality on by installing the module, and you can turn it off by unin-
stalling 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:
• Making lists, grids, and blocks from existing content (the core Views and Views UI modules)
You can download additional contributed modules from the Drupal.org Module Downloads, or create your
own custom modules.
Related topics
• Section 1.3, “Concept: Themes”
• Section 1.4, “Concept: Distributions”
Additional resources
Drupal.org community documentation page ”Module developer’s guide”
Attributions
Written by Jennifer Hodgdon.
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.
3
CHAPTER 1. UNDERSTANDING DRUPAL 1.4. CONCEPT: DISTRIBUTIONS
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”.
Related topics
• Section 11.4, “Finding Themes”
• Section 11.5, “Downloading and Installing a Theme from Drupal.org”
Additional resources
Drupal.org community documentation page ”Theming Drupal”
Attributions
Written and edited by John Grubb and Jennifer Hodgdon.
Related topics
Section 14.1, “Connecting with the Community”
Additional resources
Drupal.org Drupal Distribution Downloads
Attributions
Adapted and edited by Diána Lakatos and Antje Lorch, from ”Distributions” and ”Download & Extend —
Distributions” copyright 2000-2024 by the individual contributors to the Drupal Community Documentation.
4
CHAPTER 1. UNDERSTANDING DRUPAL 1.5. CONCEPT: TYPES OF DATA
Related topics
• Section 2.3, “Concept: Content Entities and Fields”
• Section 13.1, “Concept: Cron”
• Section 7.1, “Concept: Users, Roles, and Permissions”
• Section 2.7, “Concept: User Interface, Configuration, and Content translation”
Attributions
Adapted by Jennifer Hodgdon from ”Overview of Configuration (vs. other types of information)”, copy-
right 2000-2024 by the individual contributors to the Drupal Community Documentation
5
CHAPTER 1. UNDERSTANDING DRUPAL 1.7. CONCEPT: DRUPAL LICENSING
For more on how you can connect to and communicate with the world-wide community, see Section 14.1,
“Connecting with the Community” and Section 14.2, “Getting Support”.
Related topics
• Section 1.7, “Concept: Drupal Licensing”
• Section 13.3, “Concept: Security and Regular Updates”
• Section 14.1, “Connecting with the Community”
• Section 14.2, “Getting Support”
Additional resources
• Drupal project governance
• Drupal Code of Conduct
Attributions
Written by Jennifer Hodgdon.
• All files (PHP, JavaScript, images, Flash, etc.) that are part of a project on Drupal.org have to be under
GPL version 2 or later.
• All Drupal contributors retain copyright on their code, but agree to release it under the same license as
Drupal.
6
CHAPTER 1. UNDERSTANDING DRUPAL 1.7. CONCEPT: DRUPAL LICENSING
• Drupal modules and themes are a derivative work of Drupal. If you distribute them, you must do so
under the terms of GPL version 2 or later.
• All content on Drupal.org itself is copyrighted by its original contributors, and is licensed under the Cre-
ative Commons Attribution-ShareAlike license 2.0.
• Sample code on Drupal.org is also available under GPL version 2 or later.
Related topics
Section 14.1, “Connecting with the Community”
Additional resources
• Drupal.org page on ”Licensing”
• ”Drupal LICENSE.txt” page on api.drupal.org
• GNU General Public License, version 2
• GNU General Public License, version 3
Attributions
Adapted by Diána Lakatos at Pronovix from ”Licensing” copyright 2000-2024 by the individual contributors
to the Drupal Community Documentation.
7
Chapter 2
What is a region?
Besides its primary content, a web page contains other content such as site branding (site name, slogan, and
logo), navigation aids (menus, links, and icons), formatted text, and images. Each theme provides a set of
named regions, such as Header, Content, and Sidebar, where site builders may choose to place their content.
The available regions depend on the theme design. Only the Content region, which contains the primary
content, is required; others are optional. The core Olivero theme provides the regions highlighted in the fol-
lowing image.
9
CHAPTER 2. PLANNING YOUR SITE 2.1. CONCEPT: REGIONS IN A THEME
Related topics
• Section 8.1, “Concept: Blocks”
• Section 2.3, “Concept: Content Entities and Fields”
• Section 8.3, “Placing a Block in a Region”
Attributions
Written and edited by John MacDonald, Michael Lenahan at erdfisch, and Joe Shindelar at Drupalize.Me.
10
CHAPTER 2. PLANNING YOUR SITE 2.2. PLANNING YOUR SITE LAYOUT
Prerequisite knowledge
• Section 1.3, “Concept: Themes”
Steps
It is a good idea to plan the site layout before you start building the site and writing content; however, your
plan may need to be revised either before you start implementing it or after you have some of the site built with
draft content in place, based on budgetary concerns or stakeholder feedback.
1. Make a list of the information that your site should present to visitors. In the farmers market scenario,
this might include:
2. Decide which information should be on which pages or types of pages on the site:
Information that should be on all pages Address, hours, and recently-added recipes list
Vendor details pages Information about each vendor on its own page
Recipe details pages Details of each recipe on its own page
Home page Location, map, directions, and hours
About page History of the market
Vendors list page List of vendors, with links to vendor detail pages
Recipe list page Searchable list of recipes, with links to recipe detail pages
3. Decide which information is the most important on each page. Site visitors using mobile phones or other
small browsers will often only see the content that is presented first, and they may not scroll down to see
all of the information.
4. Decide which of these pages should appear in the main site navigation. For instance, the main navigation
might consist of the Home, About, Vendors, and Recipes pages.
5. Make a rough design sketch for each page, showing how it would look when viewed on a small screen
such as a phone, as well as on a larger screen such as a desktop browser. Considering that most site
visitors will be using smaller browsers, it is a good idea to start with the phone-size layout, to make sure
that these visitors will be able to find the information they need without too much scrolling.
11
CHAPTER 2. PLANNING YOUR SITE 2.3. CONCEPT: CONTENT ENTITIES AND FIELDS
In making these page layout plans, you might find that you need to revise your plan for which information
should be on which pages. For example, you might decide that the address, hours, and recently-added
recipes list would all fit well in the right sidebar area of all pages, when the site is viewed on desktop-
sized browsers. On the other hand, you might decide that for mobile browsers, you would instead put
the address and hours in a short format at the top of each page, but only display the recent recipe list at
the bottom of the home page.
Videos
Planning Your Site Layout
Planning Your Site Layout
Attributions
Written by Jennifer Hodgdon.
12
CHAPTER 2. PLANNING YOUR SITE 2.3. CONCEPT: CONTENT ENTITIES AND FIELDS
What is a field?
Within entities, the data is stored in individual fields, each of which holds one type of data, such as formatted
or plain text, images or other files, or dates. Field types can be defined by the core software or by modules.
Fields can be added by an administrator on entity subtypes, so that all entities of a given entity subtype have
the same collection of fields available. For example, the Vendor content type in the farmers market example
might have fields for the vendor name, a logo image, website URL, and description, whereas the Basic page
content type might only have fields for the title and page body. When you create or edit entities, you are
specifying the values for the fields on the entity.
Related topics
• Section 2.5, “Planning your Content Structure”
• Section 5.2, “Creating a Content Item”
• Section 6.1, “Adding a Content Type”
Attributions
Written and edited by Jennifer Hodgdon and Grant Dunham.
13
CHAPTER 2. PLANNING YOUR SITE 2.4. CONCEPT: MODULAR CONTENT
Related topics
• Section 2.5, “Planning your Content Structure”
• Section 6.1, “Adding a Content Type”
Attributions
Written by Jennifer Hodgdon.
14
CHAPTER 2. PLANNING YOUR SITE 2.5. PLANNING YOUR CONTENT STRUCTURE
Prerequisite knowledge
• Section 2.3, “Concept: Content Entities and Fields”
• Section 2.4, “Concept: Modular Content”
Steps
1. Brainstorm about what content your site needs to contain, which could include content that visitors would
be looking for, as well as content that you want to show to visitors. The result could be the description in
the section called “Guiding Scenario”.
2. For each identified piece of content, decide which content entity type would be the best fit. In doing this,
you’ll need to consider where and how the content will be used and edited on the site. For example, in
the farmers market site scenario, you might want to display the hours and location of the farmers market
on the sidebar of every page. For that content, a single custom block makes sense. As another example,
you might decide that pages displaying information about each vendor should be content items managed
by the core Node module, because you want vendors to be able to edit their own listings. The core Node
module permission system lets you do this easily.
These decisions do not necessarily always have only one right answer; for instance, you could decide that
vendor pages should be user profiles instead of content items, but if you did that the content would be
tied to a specific user account, and it would not be as easy to later change the ownership of a vendor page
to a different user account.
3. Within each content entity type you identified, decide what division into entity subtypes would make
sense. For example, in the farmers market site example, you would probably decide that under the Con-
tent item entity type, there should be one content type for basic pages (Home and About), one for vendor
pages, and one for recipe pages.
4. For each entity subtype you decided on, decide what fields are needed. For instance, the Vendor content
type might need fields for the vendor name, web page URL, image, and description.
5. Decide on what entity listings are needed, which could be entire pages or smaller areas on the page. For
each listing, you’ll need to determine which entities should be listed. Then you’ll need to decide in what
order and with what filtering options they should be displayed; for example, you might want to give the
site visitor the option to search by keyword, to filter the list down to a subset, or to sort the list. You’ll also
need to decide what information from the entities should be shown, which might result in adding to the
list of fields you determined in the previous step. The farmers market site, for example, needs to have a
Recipes listing page that lists content items of type Recipe, with the ability to filter by ingredients, so that
means that the Recipe content type needs an Ingredients field.
6. For each identified field on each entity subtype, identify what type of data it should contain (such as plain
text, formatted text, a date, an image file, etc.), and how many values should be allowed. Most fields are
single-valued, but for example, a Recipe should allow for multiple values in its Ingredients field.
7. Consider which fields would be best as references to taxonomy term entities: fields whose values should
be chosen from a list of allowed values. Allowed values that are expected to change and grow over time,
are good candidates. An example is the Ingredients field for the Recipe content type.
8. Consider which fields should reference other content entities. An example is that since vendors will be
submitting recipes, a field will be needed on the Recipe content type that references the Vendor content
item for the vendor who submitted the recipe.
Here’s an example of the resulting content structure for the farmers market scenario example site:
15
CHAPTER 2. PLANNING YOUR SITE 2.6. CONCEPT: EDITORIAL WORKFLOW
Related concepts
Section 6.5, “Concept: Taxonomy”
Videos
Planning Your Content Structure
Planning Your Content Structure
Attributions
Written and edited by Jennifer Hodgdon and Grant Dunham.
16
CHAPTER 2. PLANNING YOUR SITE 2.7. CONCEPT: USER INTERFACE, …
Published/Unpublished status The Content item entity type supports marking each content item as either
Published or Unpublished. Viewing permissions are separate for published and unpublished content; for
example, all site visitors might be able to see published content items, while only content creators and
editors can see unpublished content items.
Revision tracking Some content entity types support revision tracking, meaning that as content is revised,
the software stores the older revisions, so that they can be compared or reverted.
Workflows The core Workflows module lets you define workflow states and transitions, beyond just having
content be published or unpublished. The companion core Content Moderation module lets you assign
permissions and roles to the workflow transitions. Both can be used with both Content item and Custom
block entity types.
Block placement The Custom block content entity lets you create a custom block and edit it, but only make
it visible on the site once it is ready.
Related topics
• Section 5.2, “Creating a Content Item”
Attributions
Written and edited by Diána Lakatos at Pronovix, Grant Dunham, and Jennifer Hodgdon.
17
CHAPTER 2. PLANNING YOUR SITE 2.7. CONCEPT: USER INTERFACE, …
Content text and files If your site is multilingual, you can configure the content fields on your site to be trans-
latable. After creating content in one language, you can translate it into other languages. Fields can con-
tain textual information or uploaded files, and for each field on each entity subtype, you can configure it
to be translatable or non-translatable. You need to have the core Content Translation module installed in
order to translate this text.
Related topics
• Section 10.1, “Adding a Language”
• Section 10.2, “Configuring Content Translation”
• Section 10.3, “Translating Content”
Attributions
Written by Jennifer Hodgdon.
18
Chapter 3
Installation
PHP
PHP 8.1 or a higher PHP 8 version. PHP must be set up with a minimum memory size of 64MB; if you are
running multiple modules on your site or using memory-intensive PHP-based command-line tools (such as
Composer), considerably more memory than that may be needed.
Certain PHP extensions are also required; the exact list of required PHP extensions depends on how you
install the core software and which modules you are using on your site. Generally, hosting service providers
have installed all the PHP extensions you will need. If you are self-hosting or running your site on your local
computer, you will get error messages during installation if any required PHP extensions are missing, and
should be able to install them and continue.
Web server
Apache (Recommended) Apache is the most commonly used web server. The core software will work on
Apache 2.4.7 or higher hosted on UNIX/Linux, OS X, or Windows that have the Apache mod_rewrite
module installed and enabled. The Apache VirtualHost configuration must contain the directive Al-
lowOverride All to allow the .htaccess file to be used.
PHP Local Server You can temporarily run a local demo site on your computer using just PHP, without in-
stalling web server software.
Nginx Nginx is a commonly used web server that focuses on high concurrency, performance and low memory
usage. The core software will work on Nginx 0.7 or greater hosted on UNIX/Linux, OS X, or Windows.
The ngx_http_rewrite_module must be installed and enabled.
Microsoft IIS Microsoft IIS is a web server and set of feature extension modules for use with Microsoft Win-
dows. The core software will work with IIS 5, 6, 7, 8, or 10 if PHP is configured correctly. Because clean
URLs are required, you may need to use a third party product. For IIS 7/8, you can use the Microsoft
URL Rewrite module or a third party solution.
19
CHAPTER 3. INSTALLATION 3.2. CONCEPT: ADDITIONAL TOOLS
Database
Use one of the following databases:
• MySQL - 5.7.8 (MariaDB 10.3.7, Percona 5.7.8) or higher with an InnoDB-compatible primary storage
engine
• PostgreSQL - 10.0 or higher with the pg_trgm extension
• SQLite - 3.26 or higher. Temporary local demo sites use SQLite, which is distributed as part of PHP
and doesn’t require installing separate database software, but make sure your version of PHP has the
minimum SQLite included.
Additional resources
• Drupal.org community documentation page ”System requirements”
• PHP Runtime Configuration (PHP memory limit and other settings)
• Installing a new Drupal application on your local machine
Attributions
Adapted by Karl Kedrovsky, Brian Emery, and Jennifer Hodgdon from ”System requirements”, copyright
2000-2024 by the individual contributors to the Drupal Community Documentation.
Drush and Drupal Console See below for more about command-line tools.
Git See below for more about version control tools.
Composer See below for more about Composer.
Devel The contributed Devel module helps with development tasks such as debugging and inspecting code,
analyzing database queries, and generating dummy content.
20
CHAPTER 3. INSTALLATION 3.2. CONCEPT: ADDITIONAL TOOLS
The most popular tools are Drush and Drupal Console. Drush has been available longer, and has commands
for both the core software and contributed modules; Drupal Console started as a tool for module programmers,
but has a growing list of commands for site builders. This guide documents commands from the latest stable
version of Drush for many tasks; it does not document Drupal Console commands or commands for older
versions of Drush, but you can look them up in the Drupal Console and Drush documentation.
To use these tools, you will need to have command-line terminal access to the server where your website
will be hosted, and you will need to install Composer first in order to install either the Drush or Drupal Console
tool.
To install Drush or Drupal Console first make sure your project is using Composer to manage dependencies.
See below for more about Composer. Then use the following commands:
# Install Drush
composer require drush/drush
• Look at the added, changed, or deleted files before you commit the changes (update the repository)
• Merge changes from different team members together
• Keep files and configuration synchronized between local and live sites
There are many proprietary and open-source version control systems to choose from; a popular choice is
Git, which is open-source software that runs on most computer platforms. Git is a distributed version control
system that allows you to have one or more copies of your repository, which allows you to commit changes to a
copy and then only push them to the repository you’ve designated as canonical when you’re ready to share them
with others. The canonical git repository can be hosted on your local computer or a server at your company,
but many software projects and individuals host their Git repositories using third-party services provided by
GitLab or GitHub.
21
CHAPTER 3. INSTALLATION 3.3. CONCEPT: METHODS FOR DOWNLOADING …
Drupal Console Drupal Console is a command-line tool that generates boilerplate code and interacts with
a Drupal site. It can generate, for example, block or form code, install modules and themes, and create
dummy content. Drupal Console makes use of the Symfony Console.
Coder Coder is a command-line tool that checks if your modules and themes comply with coding standards
and other best practices. It can also fix coding standard violations.
Browser debugging tools Web browsers such as Firefox and Chrome include tools that allow viewing, edit-
ing, debugging, and monitoring CSS, HTML, and JavaScript. You can open the debugging pane or win-
dow by right-clicking the mouse in an area of your window, and choosing ”Inspect” or ”Inspect element”.
Related topics
Section 3.5, “Using Composer to Download and Update Files”
Additional resources
• Drupal.org community documentation page ”Development tools overview”
Attributions
Written and edited by Boris Doesborg and Jennifer Hodgdon. Some text adapted from ”Introduction to
Git”, copyright 2000-2024 by the individual contributors to the Drupal Community Documentation.
3.3 Concept: Methods for Downloading and Installing the Core Software
Prerequisite knowledge
• Section 3.2, “Concept: Additional Tools”
• Section 3.1, “Concept: Server Requirements”
• Section 1.4, “Concept: Distributions”
Use a one-click installer from your hosting provider If you choose to install the core software at your host-
ing provider, your hosting provider may have specific documentation and/or a one-click install that you
can use. See Drupal.org’s list of hosting providers that support Drupal.
Use a pre-configured environment Use a pre-configured environment or virtual machine that contains Dru-
pal and all the required supporting software to install Drupal locally. See the section for your operating
system under Drupal.org community documentation page ”Local server setup guide” for possible options.
22
CHAPTER 3. INSTALLATION 3.4. PREPARING TO INSTALL
Download manually from the web site If you plan to build a site without add-on modules that have compli-
cated dependencies, you can download the core software, or a distribution that contains the core software
and additional modules or themes, from the web site. See Section 3.6, “Downloading the Core Software
Manually” for instructions.
Use Composer If you plan to use the Drush tool (see Section 3.2, “Concept: Additional Tools”), or if you
are building a site that might use modules with complicated dependencies, you should use Composer to
download the core software, because Composer will manage the dependencies properly. If you start your
site by downloading manually, however, you can convert to using Composer to manage dependencies
later. See Section 3.5, “Using Composer to Download and Update Files” for downloading and conversion
instructions.
Prerequisite knowledge
• Section 3.1, “Concept: Server Requirements”
• Section 3.2, “Concept: Additional Tools”
• Section 3.3, “Concept: Methods for Downloading and Installing the Core Software”
• How to install and configure server software (if installing on your own computer)
• How to set up hosting for a generic web site
• How to create a database
23
CHAPTER 3. INSTALLATION 3.5. USING COMPOSER TO DOWNLOAD AND …
Site prerequisites
Server software must be installed on the computer where you plan to host your site. See Section 3.1, “Concept:
Server Requirements”.
Depending on how you plan to download the core software, you may need to install additional software
tools first. See Section 3.3, “Concept: Methods for Downloading and Installing the Core Software” and Sec-
tion 3.2, “Concept: Additional Tools”.
Steps
1. Choose methods for downloading and installing the core software, from those listed in Section 3.3, “Con-
cept: Methods for Downloading and Installing the Core Software”. The rest of these instructions apply
to the Composer and manual download options and the interactive installer; if you chose other options,
the software should be installed for you.
2. Set up a URL and hosting for your site on the server. Verify that the hosting is working by putting a simple
HTML file in the web root directory of the hosting, and visiting the URL for your site.
3. Create a database, along with a database user account with full access.
4. Download the core software files to the web root directory, using the method you decided on. See Sec-
tion 3.3, “Concept: Methods for Downloading and Installing the Core Software” for links to instructions.
Videos
Preparing to Install
Preparing to Install
Additional resources
Drush
Attributions
Written and edited by Drew Gorton, Michael Lenahan at erdfisch, Jennifer Hodgdon, and Jojy Alphonso at
Red Crackle.
Prerequisite knowledge
Section 3.2, “Concept: Additional Tools”
24
CHAPTER 3. INSTALLATION 3.5. USING COMPOSER TO DOWNLOAD AND …
Site prerequisites
If you want to use Composer, it must be installed either on a local development server or your live site. See
Section 3.2, “Concept: Additional Tools”.
Steps
If you are unable to install the Composer tool on your live server, you can follow the steps in any of the sections
below on your local server, and then transfer any updated or added files to your live server. The recommended
procedure is to make an archive or zip file of the new and changed directories, transfer the archive to your live
server, delete the directories that have changed, and extract the archive. Make sure to check for updates and
additions to the following files, in the root of your installation:
• vendor directory
• autoload.php
• composer.json
• composer.lock
2. Enter this command, where mydir is the directory you want to create:
composer create-project drupal/recommended-project mydir
3. The latest release of the core software will be downloaded to the mydir/web sub-directory.
1. Each time you want to add a contributed module or theme, determine the project’s short name. This is the
last part of the URL of the project page; for example, the Geofield module, at https://www.drupal.org/-
project/geofield, has short name geofield.
25
CHAPTER 3. INSTALLATION 3.6. DOWNLOADING THE CORE SOFTWARE …
2. To download the contributed module or theme, along with its external dependencies, enter the following
command at the root of your site (substituting the short name of the module or theme for geofield):
composer require drupal/geofield
1. Determine the short name of the project you want to update. For the core software, it is core. For con-
tributed modules and themes, it is the last part of the URL of the project page; for example, the Geofield
module, at https://www.drupal.org/project/geofield, has short name geofield.
2. If you want to update to the latest stable release, use the following command, substituting the short name
of the project to be updated for geofield:
composer update drupal/geofield --with-dependencies
3. If you need a specific version, determine how to enter the version number you want to update to. For
example, for version 8.x-1.16 of a contributed module, you would enter just the 1.16, and for the core
software version 9.0.7, you would enter 9.0.7. Then enter the following command at the root of your site
(substituting the short name of the project for geofield and the correct version number):
composer require drupal/geofield:1.16
Videos
Using Composer and Git to Download Files
Using Composer and Git to Download Files
Additional resources
• Drupal.org community documentation page ”Using Composer to manage Drupal site dependencies”
Attributions
Adapted by Jennifer Hodgdon, Hans Fredrik Nordhaug, and Joe Shindelar at Drupalize.Me from ”Using
Composer to manage Drupal site dependencies”, copyright 2000-2024 by the individual contributors to the
Drupal Community Documentation.
26
CHAPTER 3. INSTALLATION 3.6. DOWNLOADING THE CORE SOFTWARE …
Prerequisite knowledge
• Section 1.4, “Concept: Distributions”
• Section 3.3, “Concept: Methods for Downloading and Installing the Core Software”
Steps
1. Go to https://www.drupal.org and navigate to Build > Download & Extend in the top-level menu.
2. If you want to download just the core software, click the Download Drupal zip or download tar.gz link, and
save the file to your local machine.
3. If you want to download a distribution, click the Distributions icon or link, choose a distribution from the
list, click through to its project page. On the project page click the link to view the release notes for the
latest release, and click the link to download a zip or tar.gz file to your local machine.
4. Upload the downloaded file to your hosting account. Log in to the control panel and navigate to the
HTML directory. Save the file there.
5. Uncompress the tar.gz or zip file, which will create a new directory. If you do not have terminal access,
or your hosting server is not running Linux, your hosting control panel’s file manager should provide a
way to extract the files. If you have terminal access to your hosting server (running Linux), you can use
a command like:
tar -xzf drupal-9.0.7.tar.gz
27
CHAPTER 3. INSTALLATION 3.7. RUNNING THE INTERACTIVE INSTALLER
6. Delete the compressed file from the server, unless your unpacking method already deleted it.
7. Rename the directory or reconfigure your web hosting, so that the directory name matches the directory
your web hosting is configured to use for your site.
The demo site will be installed, and your web browser should open to log in to the new site, which will only
run as long as the PHP command is active. To learn more about this functionality, use its help command:
php core/scripts/drupal quick-start --help
Videos
Downloading the Core Software Manually
Downloading the Core Software Manually
Attributions
Written and edited by Drew Gorton, Michael Lenahan at erdfisch, Jennifer Hodgdon, and Jojy Alphonso at
Red Crackle.
Site prerequisites
Section 3.4, “Preparing to Install”
Steps
1. If you are using a 1-click install from a hosting provider or demo site, you will most likely see some or
all of the following screens as part of the installation process. If you uploaded the core files manually or
using Composer, to start the installer, open a browser and visit the URL that you set up for your hosting.
2. Select a language on the first page of the installer; for example, English. You could optionally choose
from any of the other listed languages. The language files for the chosen language will be downloaded
and installed so that the rest of the installation process can be finished in the chosen language. After
choosing a language, click Save and continue.
28
CHAPTER 3. INSTALLATION 3.7. RUNNING THE INTERACTIVE INSTALLER
3. Select an installation profile. Installation profiles 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. Core contains two installation profiles. Select the core Standard installation profile. Click
Save and continue.
4. The next step in the installer will verify that your system meets the minimum requirements. If it does
not, you’ll be presented with an outline of what needs to be corrected in order to proceed. If it does, the
installer will automatically advance to the next step.
5. Provide details of the database you created in the Section 3.4, “Preparing to Install” chapter. Then click
Save and continue.
29
CHAPTER 3. INSTALLATION 3.7. RUNNING THE INTERACTIVE INSTALLER
6. The next step will display a progress bar under the heading Installing Drupal. After the installer has
completed, it will automatically advance to the next step.
30
CHAPTER 3. INSTALLATION 3.7. RUNNING THE INTERACTIVE INSTALLER
7. The next step is to configure some basic information about your new site (also notice if there is a warning
about file permissions, for a later step). Note that the user account you create in this step is the site’s
admin account. See Section 7.2, “Concept: The User 1 Account” for important information about this
unique account. You can safely name this account ”admin”, and make sure to choose a secure and unique
password.
Fill in the form with the following information:
31
CHAPTER 3. INSTALLATION 3.7. RUNNING THE INTERACTIVE INSTALLER
32
CHAPTER 3. INSTALLATION 3.7. RUNNING THE INTERACTIVE INSTALLER
9. You will be redirected to the front page of your new site and you should see the message Congratulations,
you installed Drupal! displayed at the top of the page.
10. You may have seen a warning in the Configuration step about file permissions, and you may continue to
see this warning until you fix the permissions. To avoid the warning and make your site more secure,
change the permissions on the sites/default directory and the sites/default/settings.php file so that they are
read-only (you may need to consult your hosting company documentation about how to do that).
Related concepts
• Section 11.7, “Concept: Development Sites”
• Section 3.2, “Concept: Additional Tools”
Videos
Running the Installer
Running the Installer
33
CHAPTER 3. INSTALLATION 3.7. RUNNING THE INTERACTIVE INSTALLER
Additional resources
• Drupal.org community documentation page ”Create a database”
• Drupal.org community documentation section ”Webhosting issues”
Attributions
Written and edited by Joe Shindelar at Drupalize.Me, and Jojy Alphonso at Red Crackle.
34
Chapter 4
Content Lists and manages existing content, and allows creation of new content.
Structure Contains a list of links for managing structural elements of the site, such as blocks, content types,
menus, and taxonomy.
Appearance Manages themes and appearance-related settings.
Extend Manages the installation and uninstallation of modules.
Help Lists help topics for installed modules that provide them.
The arrow button on the far right side of the second line of the toolbar (or far left side, if the site is being
viewed using a right-to-left-reading language like Arabic) can be used to switch the menu from appearing
horizontally at the top of the page, to a vertical format on the left side (or right side, in right-to-left languages).
When viewed vertically, the menu becomes an interactive tree.
35
CHAPTER 4. BASIC SITE CONFIGURATION 4.1. CONCEPT: ADMINISTRATIVE OVERVIEW
36
CHAPTER 4. BASIC SITE CONFIGURATION 4.1. CONCEPT: ADMINISTRATIVE OVERVIEW
This guide has a standard way to describe navigation to administrative pages using the administrative tool-
bar. See the section called “Conventions of the Guide” for more information.
• You can click the master pencil icon (or its Edit link) at the right end of the top bar in the toolbar, which will
activate all of the contextual links on the current page. This icon is only visible on pages with contextual
links.
37
CHAPTER 4. BASIC SITE CONFIGURATION 4.2. EDITING BASIC SITE INFORMATION
Attributions
Written by Scott Wilkinson and Jennifer Hodgdon.
Prerequisite knowledge
Section 4.1, “Concept: Administrative Overview”
38
CHAPTER 4. BASIC SITE CONFIGURATION 4.2. EDITING BASIC SITE INFORMATION
Steps
Configuring the basic site information
1. In the Manage administrative menu, navigate to Configuration > System > Basic site settings (admin/config/system/site-
information) to change the Site name, Slogan, administrative Email address, or the Default front page path.
3. After editing the fields, click Save configuration to see the changes applied to the site.
39
CHAPTER 4. BASIC SITE CONFIGURATION 4.2. EDITING BASIC SITE INFORMATION
3. After editing the fields, click Save configuration to see the changes applied to the site.
Videos
Editing Basic Site Information
Editing Basic Site Information
40
CHAPTER 4. BASIC SITE CONFIGURATION 4.3. INSTALLING A MODULE
Additional resources
Drupal.org community documentation page ”Getting started with Drupal administration”
Attributions
Written and edited by Sree Veturi, Michael Lenahan at erdfisch, Antje Lorch, Jennifer Hodgdon, and Joe
Shindelar at Drupalize.Me.
Prerequisite knowledge
Section 1.2, “Concept: Modules”
Site prerequisites
If you want to use Drush to install modules, Drush must be installed. See Section 3.2, “Concept: Additional
Tools”.
Steps
You can use the administrative interface or Drush to install modules.
41
CHAPTER 4. BASIC SITE CONFIGURATION 4.4. UNINSTALLING UNUSED MODULES
Using Drush
1. In the Manage administrative menu, navigate to Extend (admin/modules). The Extend page appears show-
ing all the available modules in your site.
2. Find the machine name of the module you want to install, by expanding the information area for the
module. For instance, the core Actions UI module’s machine name is action.
3. Run the following Drush command to install the module:
drush pm:enable action
Videos
Installing a Module
Installing a Module
Additional resources
Drush
Attributions
Written and edited by Boris Doesborg and Jennifer Hodgdon, and Joe Shindelar at Drupalize.Me.
Prerequisite knowledge
Section 1.2, “Concept: Modules”
Site prerequisites
• You must have at least one unused module on your site that you want to uninstall, such as the core Search
module.
• If you want to use Drush to uninstall modules, Drush must be installed. See Section 3.2, “Concept: Ad-
ditional Tools”.
Steps
You can use the administrative interface or Drush to uninstall modules.
42
CHAPTER 4. BASIC SITE CONFIGURATION 4.4. UNINSTALLING UNUSED MODULES
2. Check the boxes for the modules you are uninstalling (Search, History, and Actions UI). Click Uninstall at
the bottom of the page.
NOTE
You cannot uninstall a module if it is required by some other module(s) and/or func-
tionality. For example, the core File module is required by the core Text Editor,
CKEditor, and Image modules. It can’t be uninstalled unless you uninstall its de-
pendent module(s) and functionality first. A module that cannot be uninstalled yet
will have a disabled checkbox, restricting you from uninstalling it.
3. Step 2 will prompt you to confirm the module uninstall request. Click Uninstall.
43
CHAPTER 4. BASIC SITE CONFIGURATION 4.4. UNINSTALLING UNUSED MODULES
44
CHAPTER 4. BASIC SITE CONFIGURATION 4.5. CONFIGURING USER ACCOUNT SETTINGS
Using Drush
1. In the Manage administrative menu, navigate to Extend (admin/modules). The Extend page appears show-
ing all the available modules in your site.
2. Find the machine name of the module you want to uninstall, by expanding the information area for the
module. For instance, the core Actions UI module’s machine name is action.
3. Run the following Drush command to uninstall the module:
drush pm:uninstall action
Videos
Uninstalling Unused Modules
Uninstalling Unused Modules
Attributions
Written and edited by Joe Shindelar at Drupalize.Me, Surendra Mohan, and Jojy Alphonso at Red Crackle.
Prerequisite knowledge
Section 4.1, “Concept: Administrative Overview”
Steps
1. In the Manage administrative menu, navigate to Configuration > People > Account settings (admin/con-
fig/people/accounts).
2. Under Registration and cancellation, select Administrators only as the people with permissions to register
user accounts. You can check Require email verification when a visitor creates an account in case you want to
change the settings for account registration later on.
45
CHAPTER 4. BASIC SITE CONFIGURATION 4.5. CONFIGURING USER ACCOUNT SETTINGS
3. Optionally, change the default email address from which user account notifications from the farmers
market website will be sent. This will help you maintain a separate email address from the one used for
the website in general. For example, this email address for user account notifications will be useful for a
staff member(s) communicating with vendors.
4. Optionally, edit the email templates under Emails to customize automated emails. There are several email
templates provided by the core software. They are meant for different user-specific occasions. All of them
can be personalized and three can be disabled via checkboxes: activation, blocking, and cancellation.
You can send out your own text (for example, welcoming the new vendors for whom accounts were just
created) by editing the Welcome (new user created by administrator) template.
46
CHAPTER 4. BASIC SITE CONFIGURATION 4.6. CONFIGURING THE THEME
Related concepts
See Chapter 7, Managing User Accounts for more information about user accounts and permissions.
Videos
Configuring User Account Settings
Configuring User Account Settings
Additional resources
Securing your site can help you with a more safety-focused approach to configuration.
Attributions
Written and edited by Laura Vass at Pronovix, and Jojy Alphonso at Red Crackle.
Prerequisite knowledge
Section 1.3, “Concept: Themes”
47
CHAPTER 4. BASIC SITE CONFIGURATION 4.6. CONFIGURING THE THEME
Steps
1. In the Manage administrative menu, navigate to Appearance (admin/appearance).
2. Under Installed themes, you will find Olivero listed as your default theme. Under Olivero (default theme),
click Settings.
3. Under Logo image, uncheck Use the logo supplied by the theme.
4. Under Upload logo image, locate a logo file and upload it to your site. Note: You can also set a universal logo
for all themes under Appearance > Settings (admin/appearance/settings). A custom logo for your theme will
override the universal logo.
Once you have selected the file you would like to upload, you will see its filename next to the Choose File
or Browse button in your browser.
5. Under Olivero Utilities, you can choose to use a different color scheme for the theme. You can choose from
a list of existing color scheme’s, or enter a color and the core software will generate a new scheme based
on that color.
Field Color
Primary base color #7db84a (green)
48
CHAPTER 4. BASIC SITE CONFIGURATION 4.6. CONFIGURING THE THEME
+ Note: You can also use a color picker by pressing the colored square on the right to select a color of your
choice. The web color codes will be added for you.
1. In order to save your changes and see the updated colors and logo on your site, click Save configuration at
the bottom of the page.
2. Click Return to site or Home in the toolbar to verify that you have updated the core Olivero theme settings
for your website.
49
CHAPTER 4. BASIC SITE CONFIGURATION 4.6. CONFIGURING THE THEME
Videos
Configuring the Theme
Configuring the Theme
Attributions
Written and edited by Ann Greazel, Amanda Luker at Advomatic, Jack Haas, and Joe Shindelar at Drupal-
ize.Me.
50
Chapter 5
What is a Path?
A path is the unique, last part of the URL for a specific function or piece of content. For example, for a page
whose full URL is http://example.com/node/7, the path is node/7.
Here are some examples of paths you might find in your site:
• node/7
• taxonomy/term/6
• admin/content/comment
• user/login
• user/3
What is an Alias?
The core software has a feature called ”URL Alias” that allows you to provide a more understandable name
to the content. So, if you have an ”About Us” page with the path node/7, you can set up an alias so that your
visitors will see it as http://www.example.com/AboutUs. The core Path module, which supports URL aliasing,
provides this functionality.
Related topics
• Section 5.2, “Creating a Content Item”
• Section 5.3, “Editing a Content Item”
Attributions
Adapted by Diána Lakatos at Pronovix from ”URL aliases”, and ”URL paths” copyright 2000-2024 by the
individual contributors to the Drupal Community Documentation
51
CHAPTER 5. BASIC PAGE MANAGEMENT 5.2. CREATING A CONTENT ITEM
Prerequisite knowledge
• Section 5.1, “Concept: Paths, Aliases, and URLs”
• Section 2.3, “Concept: Content Entities and Fields”
Site prerequisites
The Basic page content type must exist. This is created on your site when you install with the core Standard
installation profile.
Steps
1. In the Manage administrative menu, navigate to Content > Add content > Basic page (node/add/page). The
Create Basic page form appears.
2. Click Edit summary.
3. Fill in the fields as shown below.
By clicking the Source button in the rich text editor toolbar, you can see the HTML source code of the text
that you are editing.
52
CHAPTER 5. BASIC PAGE MANAGEMENT 5.2. CREATING A CONTENT ITEM
Related concepts
• Section 2.7, “Concept: User Interface, Configuration, and Content translation”
• Section 5.1, “Concept: Paths, Aliases, and URLs”
• Section 5.3, “Editing a Content Item”
53
CHAPTER 5. BASIC PAGE MANAGEMENT 5.3. EDITING A CONTENT ITEM
Videos
Creating a Content Item
Creating a Content Item
Additional resources
Drupal.org community documentation page ”About nodes”
Attributions
Written by Agnes Kiss and Boris Doesborg.
Prerequisite knowledge
Section 5.2, “Creating a Content Item”
Site prerequisites
A content item for the Home page must exist. See Section 5.2, “Creating a Content Item”.
Steps
1. In the Manage administrative menu, navigate to Content (admin/content).
2. If the content item you want to edit was updated or created recently, it should appear near the top of the
content list on that page. If not, you can use the Content type, Title, or other filters to locate the content
item.
3. Click Edit in the row of the content item you want to edit (Home), to open the content editing form.
Update the opening hours in the Body field. See Section 5.2, “Creating a Content Item” for an explanation
of the fields and a screenshot.
4. Check Create new revision under Published, if it is not already checked, and enter a Revision log message
explaining what changes you are making (for example, you might enter ”Updated opening hours”). This
text will appear in the revision log for the page.
54
CHAPTER 5. BASIC PAGE MANAGEMENT 5.4. DESIGNATING A FRONT PAGE FOR YOUR SITE
Videos
Editing a Content Item
Editing a Content Item
Attributions
Written by Chris Dart and Jennifer Hodgdon.
Site prerequisites
The content item that you want to designate as the front page of your site must exist. See Section 5.2, “Creating
a Content Item”.
55
CHAPTER 5. BASIC PAGE MANAGEMENT 5.4. DESIGNATING A FRONT PAGE FOR YOUR SITE
Steps
1. In the Manage administrative menu, navigate to Configuration > System > Basic site settings (admin/config/system/site-
information).
2. Under Front page, replace /node with the name of the page you would like to make the home page. To use
the home page that was previously created, provide its path /home. Click Save configuration.
3. Navigate to the home page to verify that it displays content as configured by you.
• Follow Section 5.2, “Creating a Content Item” to create an error page to be used as a 404 (page not found)
or 403 (not authorized) response on your site. Then following the steps here, you can designate it as the
error response, in the Error pages section of the configuration.
56
CHAPTER 5. BASIC PAGE MANAGEMENT 5.5. CONCEPT: MENU
Related concepts
Section 5.5, “Concept: Menu”
Videos
Designating a Front Page for Your Site
Designating a Front Page for Your Site
Attributions
Written and edited by Ann Greazel, Jack Haas, and Jojy Alphonso at Red Crackle.
Related topics
• Section 5.6, “Adding a Page to the Navigation”
• Section 5.7, “Changing the Order of Navigation”
• To display a menu, you will need to place the block that corresponds to the menu in a region of your
theme; see Section 8.1, “Concept: Blocks”, Section 2.1, “Concept: Regions in a Theme”, and Section 8.3,
“Placing a Block in a Region”. The core Standard installation profile places all of the menus it defines
except Administration in regions of the core Bartik theme. The core Toolbar module, which is installed
by the core Standard installation profile, displays the Administration menu; it is also displayed by the
contributed Admin Toolbar module.
57
CHAPTER 5. BASIC PAGE MANAGEMENT 5.6. ADDING A PAGE TO THE NAVIGATION
Attributions
Written and edited by Ajay Viswambharan, Jojy Alphonso at Red Crackle, Jennifer Hodgdon and Bill Seremetis.
Prerequisite knowledge
• Section 5.5, “Concept: Menu”
Site prerequisites
The About page content item must exist. See Section 5.2, “Creating a Content Item”.
Steps
1. In the Manage administrative menu, navigate to Content (admin/content).
2. Find the About page, and click Edit in that row. The content editing form appears.
58
CHAPTER 5. BASIC PAGE MANAGEMENT 5.6. ADDING A PAGE TO THE NAVIGATION
6. Click Save to save the changes. Click Home or Return to site in the navigation bar to see the result, which
could look like the picture below.
59
CHAPTER 5. BASIC PAGE MANAGEMENT 5.7. CHANGING THE ORDER OF NAVIGATION
Videos
Adding a Page to the Navigation
Adding a Page to the Navigation
Additional resources
Drupal.org community documentation page ”Adding a link to a menu”
Attributions
Adapted by Boris Doesborg from ”Adding a link to a menu”, copyright 2000-2024 by the individual con-
tributors to the Drupal Community Documentation; edited by Jack Haas.
Prerequisite knowledge
• Section 5.5, “Concept: Menu”
• Section 5.6, “Adding a Page to the Navigation”
60
CHAPTER 5. BASIC PAGE MANAGEMENT 5.7. CHANGING THE ORDER OF NAVIGATION
Site prerequisites
Home and About pages must exist in the main navigation menu. See Section 5.6, “Adding a Page to the Navi-
gation”.
Steps
1. In the Manage administrative menu, navigate to Structure > Menus (admin/structure/menu) where all
menus on your site are listed. Click Edit Menu from the Operations dropdown for Main navigation. You can
also reach this page using contextual links (refer to Section 4.1, “Concept: Administrative Overview”) for
the menu. Note that the names and descriptions of the menus that were provided by your installation
profile are shown in English on this page; see Section 2.7, “Concept: User Interface, Configuration, and
Content translation” for an explanation.
2. The Edit menu page will display a list of each link in the menu you chose (Main navigation).
61
CHAPTER 5. BASIC PAGE MANAGEMENT 5.7. CHANGING THE ORDER OF NAVIGATION
3. Drag the cross bar handles of menu links to change their order: Home, then About. As an alternative
to dragging, you can click the Show row weights link at the top of the table and select numerical weights
(menu links with lower or more negative weights will be shown first).
4. Click Save.
5. The home page now displays the main navigation with the Home menu link displayed first.
Related concepts
Section 5.5, “Concept: Menu”
62
CHAPTER 5. BASIC PAGE MANAGEMENT 5.7. CHANGING THE ORDER OF NAVIGATION
Videos
Changing the Order of Navigation
Changing the Order of Navigation
Attributions
Written by Ann Greazel.
63
Chapter 6
Prerequisite knowledge
Section 2.3, “Concept: Content Entities and Fields”
Site prerequisites
You need to have a plan in place for your content structure. See Section 2.5, “Planning your Content Structure”.
Steps
1. In the Manage administrative menu, navigate to Structure > Content types (admin/structure/types). The
Content types page appears showing all the available types of content. Note that the names and descrip-
tions of the content types that were provided by your installation profile are shown in English on this page;
see Section 2.7, “Concept: User Interface, Configuration, and Content translation” for an explanation.
2. Click Add content type. The Add content type page appears. Fill in the fields as shown below.
65
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.1. ADDING A CONTENT TYPE
3. Under Submission form settings, configure the form that is used for creating and editing content of this
type. Fill in the fields as shown below.
66
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.1. ADDING A CONTENT TYPE
4. Under Publishing options, decide on default options for new content of this type. Fill in the fields as shown
below.
Changing these settings does not affect the content items that have already been created.
67
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.1. ADDING A CONTENT TYPE
5. Under Display settings, decide if the author and publication date will be visible in the content item. Fill in
the fields as shown below.
68
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.1. ADDING A CONTENT TYPE
7. Click Save and manage fields to save the content type. The Manage fields page appears that allows you to
add fields to the content type. See Section 6.3, “Adding Basic Fields to a Content Type”
8. Follow the same steps to create a content type for recipes. Example values for the fields in the forms,
where they are different from the steps above:
• Install and configure the contributed Pathauto module so that content items get automatically generated
URLs/path aliases. See Section 5.1, “Concept: Paths, Aliases, and URLs” for more on URLs within your
site, Section 11.1, “Finding Modules” for instructions on finding contributed modules, and Section 11.3,
“Downloading and Installing a Module from Drupal.org” for instructions on downloading and installing
contributed modules.
Videos
Adding a Content Type
Adding a Content Type
69
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.2. DELETING A CONTENT TYPE
Attributions
Written and edited by Sree Veturi, Boris Doesborg, and Jennifer Hodgdon.
Prerequisite knowledge
Section 4.1, “Concept: Administrative Overview”
Site prerequisites
The Article content type must exist. It is created on your site when you install with the core Standard installation
profile.
Steps
1. In the Manage administrative menu, navigate to Structure > Content types (admin/structure/types). The
Content types page appears.
2. Click Delete in the Operations dropdown button for the Article content type. Note that the name of this
content type is in English on this page; see Section 2.7, “Concept: User Interface, Configuration, and
Content translation” for an explanation.
70
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.2. DELETING A CONTENT TYPE
71
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.2. DELETING A CONTENT TYPE
72
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.3. ADDING BASIC FIELDS TO A CONTENT TYPE
4. The Content types page appears with a confirmation message saying that the content type has been deleted:
Videos
Deleting a Content Type
Deleting a Content Type
Attributions
Written and edited by Sree Veturi and Boris Doesborg.
Prerequisite knowledge
Section 2.3, “Concept: Content Entities and Fields”
Site prerequisites
The Vendor content type must exist. See Section 6.1, “Adding a Content Type”.
Steps
Add the fields Vendor URL and Main image to the Vendor content type.
1. In the Manage administrative menu, navigate to Structure > Content types (admin/structure/types). Then
click Manage fields in the dropdown button for the Vendor content type. The Manage fields page appears.
From here you can either create a new field for the content type or re-use an existing field. Note that the
names and descriptions of the content types and fields that were provided by your installation profile are
shown in English on these pages; see Section 2.7, “Concept: User Interface, Configuration, and Content
translation” for an explanation.
2. Click Add field. The Add field page appears.
3. Fill in the fields as shown below.
A machine name is automatically generated, based on the Label value. Click Edit if you want to override
the default name.
73
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.3. ADDING BASIC FIELDS TO A CONTENT TYPE
4. Click Continue. The page _Vendor URL settings for Vendor appears which allows you to configure the field.
Fill in the fields as shown below.
74
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.3. ADDING BASIC FIELDS TO A CONTENT TYPE
75
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.3. ADDING BASIC FIELDS TO A CONTENT TYPE
76
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.3. ADDING BASIC FIELDS TO A CONTENT TYPE
5. Click Save settings. The Vendor URL has been added to the content type. Continue creating the Main
image field.
6. Click Add field. The Add field page appears. Fill in the fields as shown below.
7. Click Continue. The page Main image settings for Vendor appears. Fill in the fields as shown below.
+
77
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.3. ADDING BASIC FIELDS TO A CONTENT TYPE
78
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.3. ADDING BASIC FIELDS TO A CONTENT TYPE
1. Click Save settings. Main image has been added to the content type.
2. Add a Main image field to the Recipe content type, using similar steps. Start by navigating to the Recipe
content type’s Manage Fields page. Then use the Re-use an existing field button to open the modal dialog
and press the Re-use button that corresponds with the Main image field in the table. Then skip to step 7
and follow the remaining steps.
3. Create two Vendor content items (see Section 5.2, “Creating a Content Item”) called ”Happy Farm” and
”Sweet Honey”. Make sure that they include images and URLs.
79
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.4. CONCEPT: REFERENCE FIELDS
Videos
Adding Basic Fields to a Content Type
Adding Basic Fields to a Content Type
Additional resources
Drupal.org community documentation page ”Add a field to a content type”
Attributions
Written by Sree Veturi and Boris Doesborg, and Joe Shindelar at Drupalize.Me.
Related topics
Section 6.5, “Concept: Taxonomy”
Attributions
Written and edited by Surendra Mohan, and Jojy Alphonso at Red Crackle.
What is Taxonomy?
Taxonomy is used to classify website content. One common example of taxonomy is the tags used to classify or
categorize posts in a blog website; the farmers market website could use an ingredients taxonomy to classify
recipes. Individual taxonomy entities are known as terms (the blog tags or recipe ingredients in these examples);
and a set of terms is known as a vocabulary (the set of all blog post tags, or the set of all recipe ingredients in
these examples). Technically, taxonomy terms are an entity type and the entity subtypes are the vocabularies.
Like other entities, taxonomy terms can have fields attached; for instance, you could set up an image field to
contain an icon for each term.
80
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.5. CONCEPT: TAXONOMY
An individual vocabulary can organize its terms in a hierarchy, or it could be flat. For example, blog tags
normally have a flat structure, while a recipe ingredients vocabulary could be hierarchical (for example, toma-
toes could be a sub-term of vegetables, and under tomatoes, you could have green and red tomatoes).
Taxonomy terms are normally attached as reference fields to other content entities, which is how you can
use them to classify content. When you set up a taxonomy reference field, you can let users enter terms in two
ways:
Free tagging New terms can be created right on the content editing form.
Fixed list of terms The list of terms is curated and managed outside the content editing form, and users can
only choose from the existing list when editing content.
Taxonomy reference fields can be added to any entity, such as user accounts, custom blocks, or regular
content items. If you use them to classify regular content items, your site will automatically be set up with
taxonomy listing pages for each term; each of these pages lists all of the content items that are classified with
that term. For example, if you created several recipes that all had carrots as an ingredient, you might see
something like this on the Carrots taxonomy listing page:
81
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.5. CONCEPT: TAXONOMY
82
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.6. SETTING UP A TAXONOMY
Related topics
• Section 6.6, “Setting Up a Taxonomy”.
• The listing pages are views, which are covered in Chapter 9, Creating Listings with Views.
Attributions
Adapted and edited by Surendra Mohan, Jennifer Hodgdon, and Jojy Alphonso at Red Crackle from ”Orga-
nizing content with taxonomies” and ”About taxonomy”, copyright 2000-2024 by the individual contributors
to the Drupal Community Documentation.
Prerequisite knowledge
• Section 2.3, “Concept: Content Entities and Fields”
• Section 6.5, “Concept: Taxonomy”
• Section 6.3, “Adding Basic Fields to a Content Type”
Site prerequisites
The Recipe content type must exist. See Section 6.1, “Adding a Content Type”.
Steps
1. In the Manage administrative menu, navigate to Structure > Taxonomy (admin/structure/taxonomy). You
will see the Tags vocabulary that was created with the core Standard installation profile. (Note that the
name and description of this vocabulary are shown in English on this page; see Section 2.7, “Concept:
User Interface, Configuration, and Content translation” for an explanation.)
83
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.6. SETTING UP A TAXONOMY
3. Click Save. You will be taken to the Ingredients page, which shows a list of all the terms in this vocabulary.
84
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.6. SETTING UP A TAXONOMY
4. Click Add term. Enter ”Butter” in the Name field. Click Save.
85
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.6. SETTING UP A TAXONOMY
5. You will receive a confirmation about the term you created. Add more terms. For example, ”Eggs” and
”Milk”.
86
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.6. SETTING UP A TAXONOMY
6. In the Manage administrative menu, navigate to Structure > Content Types (admin/structure/types). Click
Manage fields for your Recipe content type.
7. Click Add field, and enter values from the table below. Click Save and continue.
8. On the following configuration screen, enter the values from the table below. Click Save settings.
87
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.6. SETTING UP A TAXONOMY
88
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.7. ADDING A REFERENCE FIELD
9. Click Save settings. You will be taken back to the Manage Fields page. A message will be displayed saying
that the configuration for Ingredients is complete.
Videos
Setting up a Taxonomy
Setting up a Taxonomy
Attributions
Written and edited by Bob Snodgrass, and Jojy Alphonso at Red Crackle.
Prerequisite knowledge
• Section 6.3, “Adding Basic Fields to a Content Type”
• Section 6.4, “Concept: Reference Fields”
• Section 6.1, “Adding a Content Type”
Site prerequisites
The Recipe and Vendor content types must exist. See Section 6.1, “Adding a Content Type”.
Steps
1. In the Manage administrative menu, navigate to Structure > Content types (admin/structure/types). Then
click Manage fields in the dropdown button for the Recipe content type. The Manage fields page appears.
2. Click Add field. The Add field page appears. Fill in the fields as shown below. Click Save and continue.
89
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.7. ADDING A REFERENCE FIELD
3. The page Submitted by appears which lets you set the allowed number of values. Fill in the fields as
shown below. Click Save settings.
90
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.7. ADDING A REFERENCE FIELD
4. The page Submitted by settings for Recipe appears which allows you to configure the field. Fill in the fields
as shown below. Click Save settings.
91
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.8. CONCEPT: FORMS AND WIDGETS
Videos
Adding a Reference Field
Adding a Reference Field
Attributions
Written and edited by Boris Doesborg, and Jojy Alphonso at Red Crackle.
92
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.9. CHANGING CONTENT ENTRY FORMS
In principle, you can also have multiple content editing forms available for each entity subtype. This feature
is rarely used, however; the only exception in common use is for the user profile fields: you can use different
forms for user registration and user editing. For example, you might have a limited set of fields shown when
users first register on the site, and more fields shown later on when they edit their profiles.
Related topics
• Section 6.9, “Changing Content Entry Forms”
• Section 6.10, “Concept: View Modes and Formatters”
Attributions
Written by Jennifer Hodgdon.
Prerequisite knowledge
• Section 6.1, “Adding a Content Type”
• Section 6.3, “Adding Basic Fields to a Content Type”
Site prerequisites
The Recipe content type must exist, and it must have an Ingredients taxonomy term reference field. At least
one Vendor content item must exist. See Section 6.1, “Adding a Content Type” and Section 6.6, “Setting Up a
Taxonomy”.
Steps
1. In the Manage administrative menu, navigate to Content > Add content > Recipe (node/add/recipe) to look
at the content entry form that is set up by default. Notice how you have to enter ingredients one by one,
instead of having a more compact format.
2. In the Manage administrative menu, navigate to Structure > Content types (admin/structure/types). Then
click Manage form display on the dropdown button for the Recipe content type. The Manage form display
page appears.
3. For the Ingredients field, select Autocomplete (Tags style) in the Widget column.
93
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.9. CHANGING CONTENT ENTRY FORMS
94
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.9. CHANGING CONTENT ENTRY FORMS
4. Click Save.
5. In the Manage administrative menu, navigate to Content > Add content > Recipe (node/add/recipe) to verify
the changed behavior of the content form. The Ingredients field is now a single text field that accepts
multiple values.
6. Create two Recipe content items (see Section 5.2, “Creating a Content Item”), such as recipes for ”Green
Salad” and ”Fresh Carrots”. Make sure all the fields have values, including images, ingredients, and
submitted by (set this to one of the Vendor content items you created in Section 6.3, “Adding Basic Fields
to a Content Type”).
Videos
Changing Content Entry Forms
95
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.10. CONCEPT: VIEW MODES AND FORMATTERS
Related topics
• Section 6.1, “Adding a Content Type”
Additional resources
Drupal.org community documentation page ”View modes”
Attributions
Adapted by Boris Doesborg from ”View modes”, copyright 2000-2024 by the individual contributors to the
Drupal Community Documentation.
96
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.11. CHANGING CONTENT DISPLAY
Prerequisite knowledge
• Section 2.3, “Concept: Content Entities and Fields”
• Section 6.10, “Concept: View Modes and Formatters”
Site prerequisites
The Vendor content type must exist, it must have Main Image and Vendor URL fields, and your site must have
at least one Vendor content item. See Section 6.1, “Adding a Content Type”, Section 6.3, “Adding Basic Fields
to a Content Type”, and Section 5.2, “Creating a Content Item”.
Steps
1. Find and view a Vendor content item you created in Section 6.3, “Adding Basic Fields to a Content Type”.
Notice that there are several things that could be done to improve how the page looks:
• The Main Image and Vendor URL fields should not have labels.
• The order of the fields should be changed so that the image comes first.
• The image should be smaller.
2. To fix the first two problems, and update some additional settings, in the Manage administrative menu,
navigate to Structure > Content types (admin/structure/types). Then click Manage display in the dropdown
button for the Vendor content type.
97
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.11. CHANGING CONTENT DISPLAY
3. Under the Label column, select Hidden for Main image. Do the same for Vendor URL.
98
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.11. CHANGING CONTENT DISPLAY
4. Click the gear wheel for the Vendor URL field, to open the configuration options.
6. Click Update.
7. Drag the cross bar handles of the fields to reorder as Main image, Body, Vendor URL, and Links. As an
alternative to dragging, you can click the Show row weights link at the top of the table and enter numerical
weights (fields with lower or more negative weights will be shown first).
99
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.11. CHANGING CONTENT DISPLAY
8. Click Save.
9. Find the Vendor content item from step 1 again, and verify that the updates have been made.
10. Repeat similar steps to manage the display of the Recipe content type fields.
• If you do not see the effect of these changes in your site, you might need to clear the cache. See Section 12.2,
“Clearing the Cache”.
Related concepts
Section 6.12, “Concept: Image Styles”
Videos
Changing Content Display
Changing Content Display
Additional resources
• Drupal.org community documentation page ”Specify how fields are displayed”
Attributions
Written by Ann Greazel and Boris Doesborg.
100
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.12. CONCEPT: IMAGE STYLES
Related topics
• Section 6.13, “Setting Up an Image Style”
Additional resources
Drupal.org community documentation page ”Working with images”
Attributions
Adapted and edited by Boris Doesborg, and Jojy Alphonso at Red Crackle, from ”Working with images”
copyright 2000-2024 by the individual contributors to the Drupal Community Documentation
Prerequisite knowledge
• Section 6.3, “Adding Basic Fields to a Content Type”
• Section 6.11, “Changing Content Display”
• Section 6.12, “Concept: Image Styles”
101
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.13. SETTING UP AN IMAGE STYLE
Site prerequisites
• Vendor and Recipe content types must exist. See Section 6.1, “Adding a Content Type”.
• Main image fields must exist for both content types. See Section 6.3, “Adding Basic Fields to a Content
Type”.
• Content items must exist for both content types. See Section 6.1, “Adding a Content Type”, Section 6.3,
“Adding Basic Fields to a Content Type”, and Section 5.2, “Creating a Content Item”.
Steps
1. In the Manage administrative menu, navigate to Configuration > Media > Image styles (admin/config/media/image-
styles).
7. Click Add effect. The image style is saved with the chosen effects.
102
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.13. SETTING UP AN IMAGE STYLE
103
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.13. SETTING UP AN IMAGE STYLE
8. In the Manage administrative menu, navigate to Structure > Content types (admin/structure/types).
9. Click Manage display in the Operations dropdown for the Vendor content type. The Manage display page
(admin/structure/types/manage/vendor/display) appears.
10. Ensure that the secondary tab Default is selected.
11. Click the gear wheel for the Main image field, to open the configuration options.
Related concepts
• Section 6.3, “Adding Basic Fields to a Content Type”
• Section 6.12, “Concept: Image Styles”
• Section 6.14, “Concept: Responsive Image Styles”
104
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.14. CONCEPT: RESPONSIVE IMAGE STYLES
Videos
Setting up an Image Style
Setting up an Image Style
Additional resources
Drupal.org community documentation page ”Working with images”
Attributions
Adapted and edited by Boris Doesborg, and Jojy Alphonso at Red Crackle from ”Working with images”,
copyright 2000-2024 by the individual contributors to the Drupal Community Documentation.
Related topics
Section 6.3, “Adding Basic Fields to a Content Type”
Additional resources
• Drupal.org community documentation page ”Responsive web design”
Attributions
Adapted by Boris Doesborg from Responsive images, copyright 2000-2024 by the individual contributors to
the Drupal Community Documentation.
105
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.15. CONCEPT: TEXT FORMATS AND EDITORS
Related topics
Section 13.3, “Concept: Security and Regular Updates”
Additional resources
• Drupal.org community documentation page ”Filter module overview”
• Wikipedia page ”Cross-site scripting”
Attributions
Written and edited by Boris Doesborg and Jennifer Hodgdon.
Prerequisite knowledge
Section 6.15, “Concept: Text Formats and Editors”
106
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.16. CONFIGURING TEXT FORMATS AND …
Site prerequisites
• The core Filter, Editor, and CKEditor modules must be installed. They are installed on your site when you
install with the core Standard installation profile.
• The Basic HTML text format must exist. This is created on your site when you install with the core Standard
installation profile.
Steps
1. In the Manage administrative menu, navigate to Configuration > Content authoring > Text formats and editors
(admin/config/content/formats). The Text formats and editors page appears. Note that the names of the
text formats that came with your installation profile are shown in English on this page; see Section 2.7,
“Concept: User Interface, Configuration, and Content translation” for an explanation.
2. Click Configure for the Basic HTML text format. The Basic HTML page appears.
3. Note that CKEditor is selected in the Text editor field. This allows you to configure the editor’s toolbar.
4. Drag the horizontal line button from Available buttons to the Active toolbar. Toolbar items can be visually
grouped together using a vertical divider. As an alternative to dragging, you can tab to select buttons and
then move them using keyboard arrow keys.
107
CHAPTER 6. SETTING UP CONTENT STRUCTURE 6.16. CONFIGURING TEXT FORMATS AND …
7. Click Save configuration. You will be taken back to the Text formats and editors page. A message will be
displayed saying that the text format has been updated.
Videos
Configuring Text Formats and Editors
Configuring Text Formats and Editors
Attributions
Written and edited by Boris Doesborg, and Joe Shindelar at Drupalize.Me.
108
Chapter 7
• A Vendor role that allows vendors to edit their own vendor listing page
• A Content editor role for editing the general farmers market pages
• A User manager role for managing the vendor accounts
• The Administrator role that was installed with your site, for expert users to manage the site configuration
109
CHAPTER 7. MANAGING USER ACCOUNTS 7.2. CONCEPT: THE USER 1 ACCOUNT
Related topics
• Section 7.3, “Creating a Role”
• Section 7.5, “Assigning Permissions to a Role”
• Section 7.6, “Changing a User’s Roles”
• Section 7.4, “Creating a User Account”
• Section 7.2, “Concept: The User 1 Account”
• Section 7.7, “Assigning Authors to Content”
Additional resources
• Drupal.org community documentation page ”Users, roles and permissions”
• Drupal.org community documentation page ”Managing Users”
• Drupal.org community documentation page ”User Roles”
Attributions
Adapted by Mark LaCroix, Boris Doesborg, and Jennifer Hodgdon from ”User Roles”, copyright 2000-2024
by the individual contributors to the Drupal Community Documentation.
110
CHAPTER 7. MANAGING USER ACCOUNTS 7.3. CREATING A ROLE
Additional resources
Drupal.org community documentation page ”Accounts and roles”
Attributions
Written and edited by Mark LaCroix and Jennifer Hodgdon.
Prerequisite knowledge
Section 7.1, “Concept: Users, Roles, and Permissions”
Steps
1. In the Manage administrative menu, navigate to People > Roles (admin/people/roles).
2. You will find default roles Anonymous user, Authenticated user, and Administrator already present.
111
CHAPTER 7. MANAGING USER ACCOUNTS 7.3. CREATING A ROLE
112
CHAPTER 7. MANAGING USER ACCOUNTS 7.4. CREATING A USER ACCOUNT
5. You will see the message ”Role Vendor has been added.” displayed at the top of the page.
Videos
Creating a Role
Creating a Role
Additional resources
Drupal.org community documentation page ”User Roles”
Attributions
Adapted and edited by Jack Probst, Boris Doesborg, and Joe Shindelar from ”User Roles”, copyright 2000-
2024 by the individual contributors to the Drupal Community Documentation
113
CHAPTER 7. MANAGING USER ACCOUNTS 7.4. CREATING A USER ACCOUNT
Prerequisite knowledge
• Section 7.1, “Concept: Users, Roles, and Permissions”
• Section 7.2, “Concept: The User 1 Account”
Site prerequisites
The Vendor role must exist on your site. See Section 7.3, “Creating a Role”.
Steps
1. In the Manage administrative menu, navigate to People (admin/people).
2. Click Add user.
114
CHAPTER 7. MANAGING USER ACCOUNTS 7.4. CREATING A USER ACCOUNT
115
CHAPTER 7. MANAGING USER ACCOUNTS 7.4. CREATING A USER ACCOUNT
4. Click Create new account. You will get a notification about the user account creation.
5. Create a second Vendor account for Happy Farm by following the steps above.
Videos
Creating a User Account
Creating a User Account
Attributions
Written by Diána Lakatos at Pronovix.
116
CHAPTER 7. MANAGING USER ACCOUNTS 7.5. ASSIGNING PERMISSIONS TO A ROLE
Prerequisite knowledge
• Section 7.1, “Concept: Users, Roles, and Permissions”
Site prerequisites
The Vendor role must exist on your site. See Section 7.3, “Creating a Role”.
Steps
1. In the Manage administrative menu, navigate to People > Roles (admin/people/roles). The Roles page ap-
pears.
2. Click Edit permissions in the dropdown for the Vendor role. The Edit role page appears where you can
see all the available actions for the website such as, for example, Post comments or Administer blocks. The
available permissions depend on the modules that are installed in the site. Note: Some permissions may
have security implications. Be cautious while assigning permissions to roles.
3. Check the boxes for the following permissions, listed by module:
Module Permission
Contact Use users’ personal contact forms
Filter Use the Restricted HTML text format
Node Recipe: Create new content
Node Recipe: Edit own content
Node Recipe: Delete own content
Node Vendor: Edit own content
117
CHAPTER 7. MANAGING USER ACCOUNTS 7.5. ASSIGNING PERMISSIONS TO A ROLE
4. Click Save permissions. You will get a message saying your changes have been saved.
118
CHAPTER 7. MANAGING USER ACCOUNTS 7.6. CHANGING A USER’S ROLES
Related concepts
Section 7.2, “Concept: The User 1 Account”
Videos
Assigning Permissions to a Role
Assigning Permissions to a Role
Additional resources
Drupal.org community documentation page ”Managing Users”
Attributions
Adapted and edited by Boris Doesborg, Brian Emery, and Jojy Alphonso at Red Crackle, and Joe Shindelar at
Drupalize.Me, from ”User Roles”, copyright 2000-2024 by the individual contributors to the Drupal Community
Documentation.
Prerequisite knowledge
Section 7.1, “Concept: Users, Roles, and Permissions”
Site prerequisites
The user account that you want to update, and the role you want it to have, must already exist. See Section 7.4,
“Creating a User Account”, Section 7.3, “Creating a Role”, and Section 7.5, “Assigning Permissions to a Role”.
Steps
Updating the roles using single-user editing method
1. In the Manage administrative menu, navigate to People (admin/people).
2. Locate the user 1 account (named ”admin”) to assign it the Administrator role. If it is not immediately
visible, use the Name or email contains filter, or other filters, to narrow down the list.
3. Click Edit to update the user account.
119
CHAPTER 7. MANAGING USER ACCOUNTS 7.6. CHANGING A USER’S ROLES
4. On the Edit page, scroll down to Roles section. Check the Administrator role for the user account.
5. Click Save to update the user account. You should be returned to the People page and see a message saying
that the changes have been saved.
120
CHAPTER 7. MANAGING USER ACCOUNTS 7.7. ASSIGNING AUTHORS TO CONTENT
4. Click Apply to selected items. You should see a message indicating that the desired changes were made.
Videos
Changing a User’s Roles
Changing a User’s Roles
Attributions
Written by Chris Dart and Jennifer Hodgdon
Prerequisite knowledge
• Section 7.1, “Concept: Users, Roles, and Permissions”
Site prerequisites
• The Vendor content type must exist, and your site must have at least two Vendor content items. See Sec-
tion 6.1, “Adding a Content Type”, Section 6.3, “Adding Basic Fields to a Content Type”, and Section 5.2,
“Creating a Content Item”.
• User accounts for at least two vendors must exist. See Section 7.4, “Creating a User Account”.
Steps
1. In the Manage administrative menu, navigate to Content (admin/content).
2. Find Vendor content item Happy Farm in the list. If it is not immediately visible, you can filter the list
by Published status, Content type (Vendor), Title, or Language. Click Edit for the Vendor content item you
would like to assign an author to.
121
CHAPTER 7. MANAGING USER ACCOUNTS 7.7. ASSIGNING AUTHORS TO CONTENT
3. Under Authoring information, start typing the Vendor’s user name Happy Farm in the Authored by field.
The field lists matching user names. Select the Vendor’s user name from the list.
4. Click Save.
5. You will get a notification that the Vendor content item has been updated.
6. Follow these steps again to assign Vendor content item Sweet Honey to the Vendor user account Sweet
Honey.
Videos
Assigning Authors to Content
122
CHAPTER 7. MANAGING USER ACCOUNTS 7.7. ASSIGNING AUTHORS TO CONTENT
123
Chapter 8
Blocks
Related topics
• Section 2.1, “Concept: Regions in a Theme”
• Section 8.2, “Creating A Custom Block”
• Section 8.3, “Placing a Block in a Region”
Attributions
Adapted by Les Lim from ”Managing blocks” copyright 2000-2024 by the individual contributors to the
Drupal Community Documentation.
Prerequisite knowledge
• Section 8.1, “Concept: Blocks”
• Section 2.1, “Concept: Regions in a Theme”
125
CHAPTER 8. BLOCKS 8.2. CREATING A CUSTOM BLOCK
Steps
1. In the Manage administrative menu, navigate to Content_ > Blocks (admin/content/block).
2. Click Add content block. The Add content block page appears.
4. Click Save. A message appears indicating the block has been saved.
126
CHAPTER 8. BLOCKS 8.3. PLACING A BLOCK IN A REGION
• Place the block you created in the sidebar. See Section 8.3, “Placing a Block in a Region” for details.
Videos
Creating a Custom Block
Creating a Custom Block
Additional resources
Drupal.org community documentation page ”Managing blocks”
Attributions
Adapted by Jacob Redding and Boris Doesborg from Managing blocks, copyright 2000-2024 by the individ-
ual contributors to the Drupal Community Documentation.
Prerequisite knowledge
Section 8.1, “Concept: Blocks”
Site prerequisites
• The core Olivero theme must be installed and set as default. See Section 4.6, “Configuring the Theme”.
• The Opening hours and location block must exist. See Section 8.2, “Creating A Custom Block”.
Steps
1. In the Manage administrative menu, navigate to Structure > Block layout (admin/structure/block). The Block
layout page appears, listing the theme’s regions.
2. Ensure that in the secondary tab the core Olivero theme is selected. Block placement is defined per theme.
3. Locate the region Sidebar in the list and click Place block next to it. The Place block window appears, listing
all the blocks.
4. Locate the block Opening hours and location and click Place block next to it. The Configure block window
appears. Fill in the fields as shown below.
You can also hide or display the block on specific pages. In the case of the Farmer’s market website you
do not set any of these configuration options because you want to show the block everywhere.
127
CHAPTER 8. BLOCKS 8.3. PLACING A BLOCK IN A REGION
5. Click Save block. The Block layout page appears. You can drag the cross bar handles of blocks to change
their order within each region. As an alternative to dragging, you can click the Show row weights link at
the top of the table and select numerical weights (blocks with lower or more negative weights will be
shown first).
6. Verify that the Opening hours and location block is listed in the Sidebar second region, and click Save blocks.
The block has been placed on the sidebar of all pages that use the core Bartik theme.
128
CHAPTER 8. BLOCKS 8.3. PLACING A BLOCK IN A REGION
Videos
Placing a Block in a Region
129
CHAPTER 8. BLOCKS 8.3. PLACING A BLOCK IN A REGION
130
Chapter 9
What is a view?
A view is a listing of content on a website. The core Views module handles the display of views, and the core
Views UI module allows you to create and edit them in the administrative interface. When you define views,
you are interested in taking data from your website and displaying it to the user.
131
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.2. CONCEPT: THE PARTS OF A VIEW
Related topics
• Section 9.2, “Concept: The Parts of a View”
• Section 9.3, “Creating a Content List View”
Attributions
Written and edited by Michael Lenahan at erdfisch, and Jojy Alphonso at Red Crackle.
132
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.3. CREATING A CONTENT LIST VIEW
Relationships Relationships allow you to expand what is displayed in your view, by relating the base content
being displayed to other content entities. Relationships are created using fields on the base content that
relate it to the other content; one example is that all regular content items have an author field, which
references the user account of the person who authored the content. Once you have created a relationship,
you can display fields from the referenced entity in the view.
Related topics
Section 9.3, “Creating a Content List View”
Attributions
Written and edited by Surendra Mohan and Jennifer Hodgdon.
Prerequisite knowledge
• Section 9.1, “Concept: Uses of Views”
• Section 9.2, “Concept: The Parts of a View”
Site prerequisites
• The core Views and Views UI modules must be installed. These are installed for you when you install
with the core Standard installation profile.
• The Vendor content type must exist, with URL and Main image fields. Your site must have a couple of
Vendor content items. See Section 6.1, “Adding a Content Type”, Section 6.3, “Adding Basic Fields to a
Content Type”, and Section 5.2, “Creating a Content Item”.
• The Medium (220x220) image style must be defined. This is created on your site when you install the core
Image module (installed with the core Standard installation profile) but can be recreated if deleted. See
Section 6.13, “Setting Up an Image Style”.
Steps
1. In the Manage administrative menu, navigate to Structure > Views > Add view (admin/structure/views/add).
The Add view wizard appears.
2. Fill in the fields as shown below.
133
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.3. CREATING A CONTENT LIST VIEW
134
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.3. CREATING A CONTENT LIST VIEW
4. Under Fields, click Add from the dropdown button. The Add fields pop-up appears.
135
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.3. CREATING A CONTENT LIST VIEW
17. Uncheck Create a label. This will remove the label that was created by the wizard.
18. Click Apply. The view configuration page appears.
19. Under Fields, click Rearrange in the dropdown button. The Rearrange fields pop-up appears.
20. Drag the cross bar handles of fields to put them into the right order: Image, Title, Body. As an alternative
to dragging, you can click the Show row weights link at the top of the table and enter numerical weights
(fields with lower or more negative weights will be shown first).
21. Click Apply. The view configuration page appears.
22. Optionally, click Update preview for a preview.
136
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.3. CREATING A CONTENT LIST VIEW
24. Navigate to the homepage and click Vendors from the main navigation to see the result.
137
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.4. DUPLICATING A VIEW
Videos
Creating a Content List View
Creating a Content List View
Attributions
Written/edited by Boris Doesborg and Jennifer Hodgdon.
Prerequisite knowledge
• Section 9.1, “Concept: Uses of Views”
138
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.4. DUPLICATING A VIEW
Site prerequisites
• The Vendor and Recipe content types must exist; both must have Main image fields, and the Recipe content
type must have an Ingredients field. Your site must also have a couple of Recipe content items. See
Section 6.1, “Adding a Content Type”, Section 6.3, “Adding Basic Fields to a Content Type”, Section 6.6,
“Setting Up a Taxonomy”, Section 6.9, “Changing Content Entry Forms”, and Section 5.2, “Creating a
Content Item”.
• The Vendors view must exist. See Section 9.3, “Creating a Content List View”.
Steps
1. In the Manage administrative menu, navigate to Structure > Views (admin/structure/views). Find the view
”Vendors” and click Duplicate in its dropdown button. (Note that the names of views that came with
your installation profile are shown in English on this page; see Section 2.7, “Concept: User Interface,
Configuration, and Content translation” for an explanation.)
2. Name the duplicate ”Recipes” and click Duplicate. The view configuration page appears.
3. To change the title of the view page to ”Recipes”, click Vendors in the Title field under Title. The Page: The
title of this view pop-up appears. Enter ”Recipes”. Click Apply.
139
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.4. DUPLICATING A VIEW
4. To change from a table to a grid format, click Table in the Format field under Format. The Page: How should
this view be styled pop-up appears. Check Grid and click Apply. The Page: Style options pop-up appears.
Retain the default values and click Apply.
5. To retain only the title and image fields for the Recipes view, click Content: Body under Fields. Click Remove
in the pop-up that appears.
6. To change the content type filter to use the Recipe content type, click Content: Type (=Vendor) under Filter
criteria. In the Configure filter criterion: Content: Type pop-up, check Recipe and uncheck Vendor. Click
Apply.
7. To add a further filter that is exposed to visitors, click Add in the dropdown button under Filter criteria.
Search for ”ingredients” and check ”Ingredients (field_ingredients)”. Click Add and configure filter criteria.
8. The appearing pop-up offers extra settings on vocabulary and selection type. Click Apply and continue.
The next pop-up allows you to expose this filter to visitors. Fill in the fields as shown below, and click
Apply.
140
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.4. DUPLICATING A VIEW
9. To change the Path label field to ”Recipes”, click ”/vendors” in the Path field under Page settings. In the
pop-up that appears, enter the path ”recipes” and click Apply.
Note that when editing a view, you enter paths without the leading ”/”, unlike on other administrative
pages (such as when providing a path to a content item page).
10. To change the menu link title, click ”Normal: Vendors” in the Menu field under Page settings. In the pop-up
that appears, change the title to ”Recipes” and click Apply.
141
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.4. DUPLICATING A VIEW
11. In order to use Ajax (see Ajax entry in the Glossary) to make filtering and paging faster for users, under
Advanced > Other, click No in the Use AJAX field. Check Use AJAX in the pop-up that appears, and click
Apply.
12. Click Save to save the view.
13. Go back to the home page and click Recipes in the navigation to view the new Recipes page.
Related concepts
• Section 2.5, “Planning your Content Structure”
• Ajax entry in the Glossary
Videos
Duplicating a View
Duplicating a View
142
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.5. ADDING A BLOCK DISPLAY TO A VIEW
Attributions
Written and edited by Laura Vass at Pronovix, and Jojy Alphonso at Red Crackle.
Prerequisite knowledge
• Section 9.1, “Concept: Uses of Views”
• Section 9.2, “Concept: The Parts of a View”
• Section 9.3, “Creating a Content List View”
Site prerequisites
• The Recipe content type must exist, it must have a Main image field, and your site must have a couple
of Recipe content items. See Section 6.1, “Adding a Content Type”, Section 6.3, “Adding Basic Fields to a
Content Type”, Section 6.9, “Changing Content Entry Forms”, and Section 5.2, “Creating a Content Item”.
• The Thumbnail (100x100) image style must be defined. This is created on your site when you install the
core Image module (installed with the core Standard installation profile) but can be recreated if deleted.
See Section 6.13, “Setting Up an Image Style”.
• The Recipes view must exist. See Section 9.3, “Creating a Content List View” and Section 9.4, “Duplicating
a View”.
Steps
1. In the Manage administrative menu, navigate to Structure > Views (admin/structure/views). Find the view
”Recipes” and click Edit from its dropdown button. Alternatively, navigate to the Recipes page in the
main site navigation, and click the Edit view contextual link in the main area of the page. See Section 4.1,
“Concept: Administrative Overview” for information about contextual links.
2. Create a new block display by clicking Add under Displays. Click Block from the list of links that appears.
The new display is created, and the focus is automatically switched to its configuration.
143
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.5. ADDING A BLOCK DISPLAY TO A VIEW
3. To change the title of this display, click Block in the Display name field. The Block: The name and the description
of this display pop-up appears. Change the Administrative name to ”Recent recipes”. Click Apply.
4. To change the title of the block, click Recipes in the Title field under Title. In the pop-up that appears,
select This block (override) from the For select list. Change the Title field to ”New recipes” and click Apply
(this display).
5. To change the block’s style, click Grid in the Format field under Format. In the pop-up that appears, select
This block (override) from the For select list. Select Unformatted list and Click Apply (this display). You can
further configure the style options in the next pop-up that appears. Then click Apply.
6. To configure the image field, click Content: Main image under Fields. In the pop-up that appears, select This
block (override) from the For select list. Select Image style Thumbnail (100x100). Click Apply (this display).
144
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.5. ADDING A BLOCK DISPLAY TO A VIEW
7. To remove ingredients as a filter, click Content: Ingredients (exposed) under Filter criteria. In the pop-up
that appears, select This block (override) from the For select list. Click Remove at the bottom.
8. To configure how you want the content to be sorted in the view, click Add from the dropdown button
under Sort criteria. In the pop-up that appears, select This block (override) from the For select list. Check
Authored on (in the Content category), and then click Add and configure sort criteria.
9. In the appearing configuration pop-up, select Sort descending to have the most recent recipes appear first.
Click Apply.
10. To specify the number of items to be displayed, click Mini in the Use pager field under Pager. In the pop-
up that appears, select This block (override) from the For select list. Under Pager, select Display a specified
number of items. Click Apply (this display). In the Block: Pager options pop-up, provide ”5” as the value for
Items to display. Click Apply.
11. Click Save. You will either see the view editing page again, or the Recipes page, depending on what you
did in step 1. You should also see a message saying that the view has been saved.
145
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.5. ADDING A BLOCK DISPLAY TO A VIEW
12. Place the ”Recipes: Recent Recipes” block in the Sidebar second region. See Section 8.3, “Placing a Block
in a Region”. Navigate to the site’s home page to see the block.
Videos
Adding a Block Display to a View
Adding a Block Display to a View
Attributions
146
CHAPTER 9. CREATING LISTINGS WITH VIEWS 9.5. ADDING A BLOCK DISPLAY TO A VIEW
Written and edited by Laura Vass at Pronovix, Jennifer Hodgdon, and Jojy Alphonso at Red Crackle.
147
Chapter 10
Prerequisite knowledge
Section 2.7, “Concept: User Interface, Configuration, and Content translation”
Steps
1. Install the four core multilingual modules (Language, Interface Translation, Content Translation, and
Configuration Translation), by following the steps in Section 4.3, “Installing a Module”.
2. In the Manage administrative menu, navigate to Configuration > Region and language > Languages (admin/-
config/regional/language).
3. Click Add language.
4. Select Spanish (or your preferred language) from the Language name select list. Click Add language. Af-
ter waiting for translations to finish downloading, you will be returned to the Languages page, with a
confirmation message and the new language shown.
149
CHAPTER 10. MAKING YOUR SITE … 10.2. CONFIGURING CONTENT TRANSLATION
5. Follow the steps in Section 8.3, “Placing a Block in a Region” to place the Language switcher block in the
Sidebar second region. This will enable site visitors to switch between languages, once the site has been
translated.
Videos
Adding a Language
Adding a Language
Additional resources
Drupal.org community documentation page ”Multilingual guide”
Attributions
Written and edited by Leila Tite, Jennifer Hodgdon, and Boris Doesborg.
150
CHAPTER 10. MAKING YOUR SITE … 10.2. CONFIGURING CONTENT TRANSLATION
Prerequisite knowledge
• Section 2.3, “Concept: Content Entities and Fields”
• Section 2.7, “Concept: User Interface, Configuration, and Content translation”
Site prerequisites
The core Content Translation module must be installed, and your site must have at least two languages. See
Section 10.1, “Adding a Language”.
Steps
1. In the Manage administrative menu, navigate to Configuration > Regional and language > Content language
and translation (admin/config/regional/content-language).
2. Under Custom language settings, check Content, Content block and Custom menu link to make these entity
types translatable.
3. Configuration options appear for Content, Content block and Custom menu link. Choose the subtypes you
want to translate for each entity type. Check Basic page for Content, Basic block for Content block and Custom
menu link for Custom menu link.
4. Verify the settings for the entity types as shown below:
151
CHAPTER 10. MAKING YOUR SITE … 10.3. TRANSLATING CONTENT
5. Choose the fields that should be translatable for Basic page as shown in the table below. If a field is not
translation-dependent, leave it unchecked.
6. Similarly, check the appropriate boxes for translatable fields belonging to Basic block and Custom menu link.
Videos
Configuring Content Translation
Configuring Content Translation
Additional resources
• Blog post ”Multilingual Drupal 8 tidbits, part 5”
• Blog post ”Multilingual Drupal 8 tidbits, part 17”
Attributions
Written and edited by Laura Vass at Pronovix, Jojy Alphonso at Red Crackle, and Jennifer Hodgdon.
Prerequisite knowledge
Section 2.7, “Concept: User Interface, Configuration, and Content translation”
152
CHAPTER 10. MAKING YOUR SITE … 10.3. TRANSLATING CONTENT
Site prerequisites
• The Home content item must exist. See Section 5.2, “Creating a Content Item”.
• The core Content Translation module must be installed, and your site must have at least two languages.
See Section 10.1, “Adding a Language”.
• The Basic page content type must be configured to be translatable. See Section 10.2, “Configuring Content
Translation”.
Steps
1. In the Manage administrative menu, navigate to Content (admin/content).
2. Locate the home page. You can search for it by entering ”Home” in the title field.
3. Select Translate from the dropdown button in the row of the Home content item. The page Translations of
Home appears.
4. Click Add in the row Spanish.
5. Note that the user interface has switched to Spanish. To switch it back to English, remove the first instance
of es in the browser’s URL. For example, if your URL looks like example.com/es/node/5/translations/add/en/es,
remove the es that comes immediately after example.com.
6. Fill in the fields as shown below.
153
CHAPTER 10. MAKING YOUR SITE … 10.4. TRANSLATING CONFIGURATION
Videos
Translating Content
Translating Content
Attributions
Written by Boris Doesborg.
Prerequisite knowledge
• Section 2.7, “Concept: User Interface, Configuration, and Content translation”
• Section 9.3, “Creating a Content List View”
Site prerequisites
• The core Configuration Translation module must be installed, and your site must have at least two lan-
guages. See Section 10.1, “Adding a Language”.
• The Recipes view must exist. See Section 9.3, “Creating a Content List View” and Section 9.4, “Duplicating
a View”.
Steps
The basic steps for translating any configuration on your site are:
1. In the Manage administrative menu, navigate to Configuration > Regional and Language > Configuration
translation (admin/config/regional/config-translation).
2. Locate the configuration item that you would like to translate. For example, to translate the site name,
you need to find System information. For configuration that is grouped by type (for example, views or
date formats), click the List button to list all configuration of that type, and then locate the item you are
looking for.
154
CHAPTER 10. MAKING YOUR SITE … 10.4. TRANSLATING CONFIGURATION
4. Click Add in the Spanish row. The page Add Spanish translation for Recipes view appears.
5. Under Displays > Master Display settings > Recipes default display Options, translate Display title from ”Recipes”
to ”Recetas”.
6. Under Displays > Master display settings > Recipes default display options > Exposed form > Reset options,
translate Submit button text from ”Apply” to ”Applicar”. The other buttons and labels in this section do
not appear on the Recipes page or block, and do not need to be translated.
7. Under Displays > Master display settings > Recipes default display options > Filters > (Empty) taxonomy term ID
> Find recipes using… Expose, translate Label from ”Find recipes using…” to ”Encontrar recetas usando…”.
8. Click Save translation.
9. Navigate to the Recipes page and switch to Spanish using the Language switcher block. Verify that the
labels have been translated.
155
CHAPTER 10. MAKING YOUR SITE … 10.4. TRANSLATING CONFIGURATION
• Translate other configuration. Some examples of where to find the translation pages:
– To translate the site name, navigate in the Manage administrative menu to Configuration > System >
Basic site settings > Translate system information (admin/config/system/site-information/translate).
– To translate the contact form, navigate in the Manage administrative menu to Structure > Contact forms
(admin/structure/contact). Click Translate in the dropdown button in the Website feedback row.
– To translate the name of a menu, navigate in the Manage administrative menu to Structure > Menus
(admin/structure/menu). Click Translate in the dropdown button for the menu whose name you want
to translate.
– Menu links within a menu are considered to be content (not configuration); see Section 10.2, “Con-
figuring Content Translation” to enable translation. Once translation is enabled, navigate in the
Manage administrative menu to Structure > Menus (admin/structure/menu). Click Edit menu in the
dropdown button for the menu whose links you want to translate. Click Translate in the dropdown
button for the link you want to translate.
– To translate field labels on a content type, navigate in the Manage administrative menu to Structure
> Content types (admin/structure/types). Click Manage fields in the dropdown button for the content
type whose field labels you want to edit. Click Translate in the dropdown button for the field whose
label you want to edit.
Videos
Translating Configuration
Translating Configuration
Attributions
Written and edited by Boris Doesborg and Jennifer Hodgdon.
156
Chapter 11
Prerequisite knowledge
• Section 1.1, “Concept: Drupal as a Content Management System”
• Section 1.2, “Concept: Modules”
Steps
1. Go to Drupal.org, and navigate to Download & Extend > Modules (https://www.drupal.org/project/project_module).
2. Filter your search using the categories on the module search page. Fill in the fields as shown below.
157
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.1. FINDING MODULES
158
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.1. FINDING MODULES
159
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.1. FINDING MODULES
4. To further evaluate a module, click its title in the list of search results to visit its project page.
Some aspects to pay attention to when evaluating modules:
• Project description: The description of the module on its project page should be clear and useful. You
should get an idea of its features and requirements.
• Project information: There may be warnings in this area of the page, such as if a module is no longer being
developed, or is not covered by the security advisory policy.
• Project information > Reported installs, downloads: You can see how many people have downloaded
and how many sites use the module. If it’s only used by a few sites, it might be a unique solution that not
many people need, or it might be a warning sign that you shouldn’t use it either.
• Maintainers: When was the last commit (the last time someone updated something on the module) or
last release (new version)? If the project has few open issues, a long time since commits/releases might
be appropriate, but if it has a lot of open issues and there are no commits/releases, that would be a clue
that it might be abandoned.
• Issues: See if there are any open issues, potential problems with the module. Check the Statistics to see
how regularly issues are responded to.
• Documentation, Resources: Check if the module has documentation or a README file, that can help you
install, configure, explore, and test it.
Videos
Finding Modules
Finding Modules
Attributions
Written by Diána Lakatos at Pronovix.
160
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.2. ENABLING AND DISABLING …
Prerequisite knowledge
Section 13.3, “Concept: Security and Regular Updates”
Site prerequisites
If you want to use Drush to enable or disable maintenance mode, Drush must be installed. See Section 3.2,
“Concept: Additional Tools”.
Steps
You can use the administrative interface or Drush to enable or disable maintenance mode.
4. Verify that the site is in maintenance mode by accessing it from another browser where you aren’t logged
in. If you are not able to verify, try clearing the cache. See Section 12.2, “Clearing the Cache”.
161
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.2. ENABLING AND DISABLING …
162
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.2. ENABLING AND DISABLING …
4. Verify that the site is no longer in maintenance mode by accessing it from another browser where you
aren’t logged in. If you are not able to verify, try clearing the cache. See Section 12.2, “Clearing the Cache”.
3. Run the following Drush commands to disable maintenance mode and clear the cache:
drush state:set system.maintenance_mode 0 --input-format=integer
drush cache:rebuild
163
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.3. DOWNLOADING AND INSTALLING A …
4. After running either set of commands, verify that your site is either in or out of maintenance mode by
visiting the site in a browser where you are not logged in.
Videos
Enabling and Disabling Maintenance Mode
Enabling and Disabling Maintenance Mode
Attributions
Written and edited by Boris Doesborg, Jojy Alphonso at Red Crackle, and Jennifer Hodgdon.
Prerequisite knowledge
• Section 1.2, “Concept: Modules”
• Section 11.1, “Finding Modules”
• Section 3.2, “Concept: Additional Tools”
Site prerequisites
• If you want to install modules via the website, the core Update Manager module must be installed. See
Section 4.3, “Installing a Module” for instructions on installing modules.
• If you want to use Drush, Drush must be installed. See Section 3.2, “Concept: Additional Tools”.
Steps
You can use the administrative interface to download and install a contributed module. If you are installing
a custom module rather than a contributed module, if you see a message saying Installing modules and themes
requires FTP access to your server, or if the steps below do not work to download and unpack the module files,
follow the steps in Section 11.6, “Manually Downloading Module or Theme Files”. If you are using Composer
to manage the files in your site, follow the steps for downloading in Section 3.5, “Using Composer to Download
and Update Files”. In either of these cases, you can then install the module using Drush, or by continuing with
step 7 in the instructions for the administrative interface below.
164
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.3. DOWNLOADING AND INSTALLING A …
2. Copy the address of the tar.gz link. Depending on your device and browser, you might do this by right
clicking and selecting Copy link address.
3. In the Manage administrative menu, navigate to Extend (admin/modules). The Extend page appears.
4. Click Add new module. The Add new module page appears.
165
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.3. DOWNLOADING AND INSTALLING A …
5. In the field Add from a URL, paste the copied download link. This value could look like this: https://ftp.drupal.org/files/pro
8.x-2.4.tar.gz
6. Click Continue to upload and unpack the new module on the server. The files are being downloaded to
the modules directory.
7. Click Enable newly added modules to return to the Extend page. If you used the manual uploading procedure
mentioned earlier, then you can continue with this step, and reach the Extend page by using the Manage
administrative menu and navigating to Extend (admin/modules).
8. Locate the Admin toolbar module and check it.
9. Click Install to turn on the new module.
2. Download the module using either the steps in Section 11.6, “Manually Downloading Module or Theme
Files” or Section 3.5, “Using Composer to Download and Update Files”.
166
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.4. FINDING THEMES
3. Run the following Drush command, giving the project name (for example, admin_toolbar) as a pa-
rameter:
drush pm:enable admin_toolbar
Videos
Downloading and Installing a Module from Drupal.org
Downloading and Installing a Module from Drupal.org
Additional resources
• Drupal.org community documentation page ”Installing Drupal modules”
• ”Download and Extend” page on Drupal.org
• Admin Toolbar module on Drupal.org
Attributions
Written and edited by Boris Doesborg, Joe Shindelar at Drupalize.Me, and Jennifer Hodgdon.
Prerequisite knowledge
• Section 1.1, “Concept: Drupal as a Content Management System”
• Section 1.3, “Concept: Themes”
Steps
1. Go to https://www.drupal.org, and navigate to Download & Extend > Themes (https://www.drupal.org/-
project/project_theme).
2. Filter your search using the categories on the theme search page. For example, you might use these filters:
167
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.4. FINDING THEMES
168
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.4. FINDING THEMES
169
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.4. FINDING THEMES
170
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.5. DOWNLOADING AND INSTALLING A …
4. To further evaluate a theme, click its title in the list of search results to visit its project page.
• Issues: See if there are any open issues, potential problems with the theme. Check the Statistics to see
how regularly issues are responded to.
• Documentation, Resources: Check if the theme has documentation or a README file, that can help you
install, configure, explore, and test it.
Videos
Finding Themes
Finding Themes
Attributions
Written by Diána Lakatos.
Prerequisite knowledge
• Section 11.4, “Finding Themes”
• Section 3.2, “Concept: Additional Tools”
Site prerequisites
If you want to install via the website, the core Update Manager module must be installed. See Section 4.3,
“Installing a Module” for instructions on installing modules.
If you want to use Drush, Drush must be installed. See Section 3.2, “Concept: Additional Tools”.
Steps
You can use the administrative interface to download and install a contributed theme. If you are installing a
custom theme rather than a contributed theme, if you see a message saying Installing modules and themes requires
FTP access to your server, or if the steps below do not work to download and unpack the theme files, follow
the steps in Section 11.6, “Manually Downloading Module or Theme Files”. If you are using Composer to
manage the files in your site, follow the steps for downloading in Section 3.5, “Using Composer to Download
and Update Files”. In either of these cases, you can then install the theme using Drush, or by continuing with
step 7 in the instructions for the administrative interface below.
171
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.5. DOWNLOADING AND INSTALLING A …
3. In the Manage administrative menu, navigate to Appearance (admin/appearance). The Appearance page ap-
pears.
4. Click Add new theme. The Add new theme page appears.
172
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.5. DOWNLOADING AND INSTALLING A …
5. In the field Add from a URL, paste the copied download link. This value could look like https://ftp.drupal.org/fi
6. Click _ to upload and unpack the new theme on the server. The files are being downloaded to the _themes directory.
7. Click Install newly added themes to return to the Appearance page. If you used the manual uploading pro-
cedure mentioned earlier, then you can continue with this step, and reach the Appearance page by using
the Manage administrative menu and navigating to Appearance (admin/appearance).
8. Locate the new theme under Uninstalled themes and click Install and set as default to use it. All non-
administrative pages on the site will now use this new theme.
173
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.5. DOWNLOADING AND INSTALLING A …
Videos
Downloading and Installing a Theme from Drupal.org
Downloading and Installing a Theme from Drupal.org
Attributions
Written and edited by Joe Shindelar at Drupalize.Me, and Boris Doesborgh.
174
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.6. MANUALLY DOWNLOADING MODULE OR …
Prerequisite knowledge
• Section 1.2, “Concept: Modules”
• Section 11.1, “Finding Modules”
• Section 1.3, “Concept: Themes”
• Section 11.4, “Finding Themes”
Site prerequisites
You need to be facing any of the following to perform the manual download described in this topic:
• File permission issues
• FTP permission issues
• You created a custom module/theme or received its files from someone
• You could not successfully complete the instructions in Section 11.3, “Downloading and Installing a Mod-
ule from Drupal.org”, Section 11.5, “Downloading and Installing a Theme from Drupal.org”, Section 13.6,
“Updating a Module”, or Section 13.7, “Updating a Theme”
Skip this topic if none of the above applies to you. If you are using Composer to manage the files in your
site, follow the file updating steps in Section 3.5, “Using Composer to Download and Update Files” instead of
this topic.
Steps
If you are installing a module or theme from Drupal.org, follow the downloading instructions, and then the
uploading/unpacking instructions. If you created the module or theme, skip the downloading step. Instead,
create an archive file (that you know how to extract on the server) and proceed with the steps in uploading/un-
packing, using whatever method is appropriate for the way you initially created the archive file.
175
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.6. MANUALLY DOWNLOADING MODULE OR …
3. Click tar.gz to download the file to your computer. Alternatively, if you have terminal access to your
hosting server (running Linux), you can copy the link address for the tar.gz file from your browser, and
use this command to download the file (substituting the copied URL):
wget https://ftp.drupal.org/files/projects/admin_toolbar-8.x-2.4.tar.gz
2. If you are replacing an existing module or theme with an updated version, put the site into maintenance
mode. See Section 11.2, “Enabling and Disabling Maintenance Mode”.
3. If you are replacing an existing module or theme with an updated version, find and delete all the existing
files and directories for the existing module or theme. Modules are normally located in directories under
the top-level modules directory, and themes are normally located in directories under the top-level themes
directory.
4. Upload the .tar.gz file (or whatever archive you created) to your site. Place it in either the same loca-
tion from which you deleted the directory (if replacing an existing module or theme) or the appropriate
subdirectory of modules or themes (if adding a new module or theme).
5. Extract the files from the .tar.gz archive (or whatever archive you created), making a subdirectory in the
same location as the archive file. If you do not have terminal access, or your hosting server is not running
Linux, your hosting control panel’s file manager should provide a way to extract the files. If you have
terminal access to your hosting server (running Linux) and you are using a tar.gz file, you can use a
command like:
tar -xzf admin_toolbar-8.x-2.4.tar.gz
6. Delete the compressed file from the server, unless your unpacking method already deleted it.
176
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.7. CONCEPT: DEVELOPMENT SITES
7. Refer to Section 11.3, “Downloading and Installing a Module from Drupal.org”, Section 11.5, “Download-
ing and Installing a Theme from Drupal.org”, Section 13.6, “Updating a Module”, or Section 13.7, “Updat-
ing a Theme” to complete the installation or update of the module or theme. Start at the step after the
automatic download has been completed.
Videos
Manually Downloading Module or Theme Files
Manually Downloading Module or Theme Files
Additional resources
• Drupal.org community documentation page ”Updating modules”
• Drupal.org community documentation page ”Installing Drupal modules”
• Drupal.org community documentation page ”Installing themes”
Attributions
Written and edited by Boris Doesborg, Jennifer Hodgdon, and Marc Isaacson.
177
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.8. MAKING A DEVELOPMENT SITE
Related topics
• Section 11.8, “Making a Development Site”
• Section 2.6, “Concept: Editorial Workflow”
Attributions
Written and edited by Diána Lakatos, and Jojy Alphonso at Red Crackle.
Prerequisite knowledge
Section 11.7, “Concept: Development Sites”
Site prerequisites
• You have a live, developed site that you would like to make a copy of for development purposes.
• If you want to use Drush for some of the steps in this task, Drush must be installed. See Section 3.2,
“Concept: Additional Tools”.
Steps
1. Follow the steps in Section 3.4, “Preparing to Install”, so that you have hosting set up for your development
site, you know where the web root is for your development site, and you have an empty database and
database user for your development site to use.
2. The next step is to make a database dump file, containing the contents of your site’s database. This file
can be quite large, but there are two things you can do to reduce the size:
• If you are using MySQL and have access to the command line, use this command after truncating
the cache tables (substituting in your site’s database name, user name, and password):
mysqldump -u’USERNAME’ -p’PASSWORD’ DATABASENAME | \
gzip > PATH/TO/BACKUPFILE.sql.gz
178
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.8. MAKING A DEVELOPMENT SITE
• If you are using MySQL as your database, and your live site’s server has phpMyAdmin installed (it
is available from many hosting control panels), you can truncate the cache tables by selecting them
in the phpMyAdmin table structure list and choosing the Empty operation at the bottom of the page.
Then use the Export tab in phpMyAdmin to export in SQL format, with gzip compression to reduce
the file size.
• Use the contributed Backup and Migrate module from within your live site. See Section 11.3, “Down-
loading and Installing a Module from Drupal.org” for instructions on installing contributed modules.
You now have a database dump stored in the file BACKUPFILE.sql.gz. For security reasons, avoid
storing this file on your hosting server anywhere under the Drupal site root. This will prevent others
from getting a copy of your database.
3. Copy all of the files from the web root of your live site to the web root of your development site. You may
wish to use Git to do this; if so, see Section 11.11, “Managing File and Configuration Revisions with Git”.
4. Edit the sites/default/settings.php file under your development site’s top-level directory in a plain-text ed-
itor. Find the lines near the end that contain the database name, database username, and database pass-
word, and update them to the information about the development site database you set up. The lines
look something like this (before editing):
$databases[’default’][’default’] = [
’database’ => ’live_site_database_name’,
’username’ => ’live_site_database_username’,
’password’ => ’live_site_database_password’,
b’’…b’’
5. Check whether your settings.php file has the following setting; if yes, then you will need to edit this to
point to your development site URL instead of your production site URL:
$settings[’trusted_host_patterns’]
6. Check whether your settings.php file has the following setting, and has it set to a random string value. If
it does not, then you will need to add or edit it in order to prevent fatal errors:
$settings[’hash_salt’] = ’any_string_value’;
One way to produce a random string for the hash salt is the following Drush command:
drush php-eval ’echo
\Drupal\Component\Utility\Crypt::randomBytesBase64(55) . ”\n”;’
If you don’t use Drush, there are numerous web sites and applications that provide random string gen-
erators; you’ll want to generate a string that is about 74 characters long.
7. Import the database dump file you created, into the development site’s database. Try one of the following
methods:
• If you are using MySQL as your database, and your live site’s server has phpMyAdmin installed (it
is available from many hosting control panels), use the Import tab in phpMyAdmin. You may find
that you have to restart the import a few times, if your database was large.
• If you are using MySQL and have access to the command line, use this command (substituting in
your site’s database name, user name, and password; if you made a gzip-compressed backup file,
you will also need to uncompress it first):
gunzip < PATH/TO/BACKUPFILE.sql.gz | \
mysql -u’USERNAME’ -p’PASSWORD’ DATABASENAME
179
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.9. DEPLOYING NEW SITE FEATURES
8. If your development and live sites need to have different configuration, then you have to use configuration
overrides in the settings.php file. The $config variable will help you maintain override values separately
from the standard configuration data. For instance, you might want the site name to be ”Anytown Farmers
Market” on the production site, but ”Development Site for Anytown Farmers Market” on the development
site. To do that, you could have the production value in the site configuration (in the database), and on
the development site, in the settings.php file, you would need to have:
$config[’system.site’][’name’] =
”Development Site for Anytown Farmers Market”;
Videos
Making a Development Site
Making a Development Site
Additional resources
• Installing a new Drupal application on your local machine
• Creating a Drupal demo application for evaluation purposes
Attributions
Written and edited by Jennifer Hodgdon, Joe Shindelar at Drupalize.Me, and Jojy Alphonso at Red Crackle.
Prerequisite knowledge
• Section 11.8, “Making a Development Site”
180
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.9. DEPLOYING NEW SITE FEATURES
Site prerequisites
• The core Configuration Manager module must be installed in both the development and production sites.
See Section 4.3, “Installing a Module” for instructions on installing core modules.
• The Vendor content type must exist in both the development and production sites, with the same fields.
See Section 6.1, “Adding a Content Type”.
• The Vendors view must exist in the development site but not the production site. See Section 9.3, “Creat-
ing a Content List View”.
Steps
1. Open the local development site.
2. In the Manage administrative menu, navigate to Configuration > Development > Configuration synchroniza-
tion > Export > Single item (admin/config/development/configuration/single/export). The Single export page
appears.
3. Select View from the Configuration type list.
4. Select Vendors from the Configuration name list. The configuration appears in the textarea.
5. Copy the configuration from the textarea.
181
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.9. DEPLOYING NEW SITE FEATURES
182
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.10. SYNCHRONIZING CONFIGURATION …
Related concepts
• Section 11.7, “Concept: Development Sites”
• Section 2.6, “Concept: Editorial Workflow”
Videos
Deploying New Site Features
Deploying New Site Features
Attributions
Written by Boris Doesborg.
Prerequisite knowledge
• Section 1.5, “Concept: Types of Data”
• Section 3.4, “Preparing to Install”
• Section 11.7, “Concept: Development Sites”
• Section 11.8, “Making a Development Site”
Site prerequisites
• You must have a development copy of your production site. See Section 11.8, “Making a Development
Site”.
• The core Configuration Manager module must be installed on both the development and production sites.
See Section 4.3, “Installing a Module” for instructions on how to install core modules.
• You must have changed configuration on either the production or development site (the source site), and
want to synchronize the changes to the other site (the destination site). As an example, you can develop a
new content type, fields, and views on your development site, and when it is all working correctly, deploy
the changes to the live site.
183
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.11. MANAGING FILE AND CONFIGURATION …
• All configuration that should not be synchronized between the source and destination sites must be stored
in configuration overrides in the settings.php file rather than in the database. See Section 11.8, “Making a
Development Site”.
Steps
1. In the source site, in the Manage administrative menu, navigate to Configuration > Development > Config-
uration synchronization > Export (admin/config/development/configuration/full/export).
2. Click Export. Your site will generate an archive of the full site configuration. Save the file on your local
computer.
3. In the destination site, in the Manage administrative menu, navigate to Configuration > Development >
Configuration synchronization > Import (admin/config/development/configuration/full/import).
4. Browse to find the downloaded configuration archive, and click Upload. Your configuration archive will
be uploaded to the destination site, and you will be redirected to the configuration Synchronize page (ad-
min/config/development/configuration) with a message saying your files were uploaded.
5. Verify that the differences shown on the page are what you expect. You may see configuration items that
have been added, deleted, or changed; for changed items, you can click View differences to see what the
changes are.
6. When you are satisfied, click Import all to import the configuration changes.
Videos
Synchronizing Configuration Versions
Synchronizing Configuration Versions
Attributions
Written by Jennifer Hodgdon.
Prerequisite knowledge
• Section 3.2, “Concept: Additional Tools”
• Section 3.3, “Concept: Methods for Downloading and Installing the Core Software”
184
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.11. MANAGING FILE AND CONFIGURATION …
• How to set up a Git repository and find its clone URL. For example, if you want to use GitLab to host your
repository, see GitLab ”Create a project” page and GitLab ”Command Line basic commands” page. And
if you want to use GitHub to host your repository, see GitHub ”Create a repo” page and GitHub ”Which
remote URL should I use” page.
• How to open and use a command terminal window and a plain-text editor.
• To manage configuration, how to unpack and pack archive files (such as .zip and .tar.gz).
Site prerequisites
• You must have downloaded the software for your site, using one of the methods in Section 3.3, “Concept:
Methods for Downloading and Installing the Core Software”. If you want to manage configuration, you
must have installed the software and have a running site.
• Git client software must be installed on your site’s server. See Git for instructions.
• You must have a new repository created and know its Git clone URL.
Steps
Initializing the repository
Do these steps once, after creating a Git repository, to connect your local directory to the repository and add
the initial files to it.
1. Open a command terminal window, and change to the directory where your site’s files are located. This
is your ”top” directory.
2. Determine where your web root is. If the core, modules, and themes directories are located directly in this
directory, then you are in your web root. If you have used Composer to download the software, then these
files are located inside the web subdirectory (which is your web root).
3. In a plain text editor, create a new file called .gitignore in the top directory (or edit it if it already exists).
This file contains a list of files and directories that Git should ignore (not add to the repository). For
example, the settings.php file for your site should not be added to Git, because it contains your database
account information, and the media files uploaded to your site (usually in sites/default/files) should not
be in Git either — the objective is to have the software in the repository, not the site content.
4. Make sure the following lines are in the .gitignore file. If your web root is not your top directory, check
each of these to see if they need a prefix. For example, sites may need to be replaced with web/sites.
sites/*/settings*.php
sites/*/files
config
6. Optionally, verify the list of files you will be adding to your Git repository by entering this command and
scrolling through the (very long) list:
git status
7. Enter the following commands. You can substitute your own commit message for ”Initial file add” if you
wish, and you will need to substitute your own Git clone URL for the URL in the second command:
185
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.11. MANAGING FILE AND CONFIGURATION …
8. If you are using GitLab, GitHub, or another host with online access, you can now go to your repository
page and see that the files are there.
3. Optionally, for text files that have been changed (not images), look at the differences between the new
and old versions of the file:
git diff path/to/file.txt
4. Stage all the changes for the next commit, and verify that they are staged:
git add -A
git status
5. You can omit a particular file from the commit that you have already staged, or add another file to the
ones you have already staged. If a particular file or directory keeps getting added by mistake, consider
adding it to the .gitignore file so that it will be ignored by Git. Omit/add commands:
git reset HEAD path/to/file.txt
git add path/to/file.txt
6. Commit and push your changes. Substitute something meaningful for the commit message:
git commit -m ”commit message here”
git push
7. If you have other copies of your repository, update them by opening a command window in the directory
of each copy and running the following command:
git pull
186
CHAPTER 11. EXTENDING AND CUSTOMIZING … 11.11. MANAGING FILE AND CONFIGURATION …
2. If you have not already initialized configuration in the repository, unpack the configuration archive into
a new directory, preferably above the web root directory, and follow the instructions above to add these
files to your repository.
3. After initializing, whenever your site configuration changes, export and unpack the configuration archive
in the same location. Follow the instructions above to update these files in your repository.
4. To import updated configuration to another site, make an archive of the configuration directory from
your repository. Then follow the instructions on Section 11.10, “Synchronizing Configuration Versions”
to upload and import this archive into the site.
Related concepts
Section 11.7, “Concept: Development Sites”
Attributions
Adapted and edited by Jennifer Hodgdon from ”Building a Drupal site with Git”, copyright 2000-2024 by
the individual contributors to the Drupal Community Documentation.
187
Chapter 12
• Old data remaining in the cache too long, leading to outdated page output
• Insufficient caching, leading to slow page loads
• The theme system caches information in the database cache about which template files are used to render
various types of data. If you are developing a new theme and add a new template file, you’ll need to clear
this cache to have your theme file recognized.
• CSS and JavaScript files can optionally be optimized and compressed (depending on your site settings).
If so, the compressed versions are stored in the file system so that they don’t have to be re-optimized too
often. If you are developing a module or theme, you may need to either turn off or clear this file cache to
have changes to CSS or JavaScript files be recognized.
189
CHAPTER 12. PREVENTING AND FIXING … 12.2. CLEARING THE CACHE
• The system locates certain low-level PHP functions and classes, such as hook implementations and plugin
classes, from your installed modules and stores information about which module has which functionality.
If you are developing a new module or adding features to an existing module, you may need to clear this
cache to have your new features be recognized.
Related topics
If you have problems with your site, the first thing to try to fix it is usually to clear the cache. See Section 12.2,
“Clearing the Cache” for more information.
Additional resources
Learn about additional caching and performance optimization methods in the Drupal.org community docu-
mentation page ”Caching overview”.
Attributions
Written by Jennifer Hodgdon.
Prerequisite knowledge
• Section 12.1, “Concept: Cache”
• Section 3.2, “Concept: Additional Tools”
Site prerequisites
If you want to use Drush to clear the cache, Drush must be installed. See Section 3.2, “Concept: Additional
Tools”.
Steps
You can use the administrative interface or Drush to clear the cache. You can also use the rebuild script or
Drush to do a more complete cache rebuild.
4. If this doesn’t resolve the problem that caused you to want to clear the cache, try a rebuild instead.
190
CHAPTER 12. PREVENTING AND FIXING … 12.2. CLEARING THE CACHE
Choose a cache to clear by entering the number associated with that cache. Press ”Enter” to continue.
To clear a specific cache type, you can specify it in the cache:clear command. For example to clear the render
cache:
drush cache:clear render
Videos
Clearing the Cache
Clearing the Cache
Additional resources
Drupal.org community documentation page ”Clearing or rebuilding Drupal’s cache”
Attributions
Adapted and edited by Joe Shindelar and Jack Haas from ”Clearing or rebuilding Drupal’s cache”, copyright
2000-2024 by the individual contributors to the Drupal Community Documentation.
191
CHAPTER 12. PREVENTING AND FIXING … 12.3. CONCEPT: DATA BACKUPS
Related topics
• Section 13.5, “Updating the Core Software”
192
CHAPTER 12. PREVENTING AND FIXING … 12.4. CONCEPT: LOG
Additional resources
• Drupal.org community documentation page ”Backing up a site”
• The contributed Backup and Migrate module, which can be used to set up automatic backups of the
database and uploaded files.
Attributions
Written by Jennifer Hodgdon.
193
CHAPTER 12. PREVENTING AND FIXING … 12.5. CONCEPT: STATUS REPORT
Attributions
Adapted by Diána Lakatos from ”Reports” copyright 2000-2024 by the individual contributors to the Drupal
Community Documentation
194
CHAPTER 12. PREVENTING AND FIXING … 12.5. CONCEPT: STATUS REPORT
Related topics
Section 14.2, “Getting Support”
Additional resources
If you have an error about trusted host settings in your status report, see Drupal.org community documentation
page ”Trusted Host settings”.
Attributions
195
CHAPTER 12. PREVENTING AND FIXING … 12.5. CONCEPT: STATUS REPORT
Adapted by Diána Lakatos from ”Reports” copyright 2000-2024 by the individual contributors to the Drupal
Community Documentation
196
Chapter 13
What is the relationship between the site’s cron tasks and Unix cron?
Linux/Unix-based operating systems have a cron scheduler that can be used to run periodic tasks. You can
use the server’s cron scheduler to schedule runs of the site’s cron tasks. Alternatively, you can use the core
Automated Cron module to run tasks. You can check the site’s cron tasks’ status in the status report.
Related topics
• Section 13.2, “Configuring Cron Maintenance Tasks”
• Section 12.5, “Concept: Status Report”
Additional resources
Drupal.org community documentation page ”Setting up cron”
Attributions
Written and edited by Diána Lakatos at Pronovix, Dave Hansen-Lange at Advomatic, and Boris Doesborg.
Prerequisite knowledge
Section 13.1, “Concept: Cron”
197
CHAPTER 13. SECURITY AND MAINTENANCE 13.2. CONFIGURING CRON MAINTENANCE TASKS
Steps
1. Review the Status report (see Section 12.5, “Concept: Status Report”) to see when cron maintenance tasks
were last run.
If you installed the website using the core Standard installation profile (or similar), then cron maintenance
tasks might already be running via the core Automated Cron module. By default, these tasks are run
about every three hours.
2. Choose whether to run cron maintenance tasks using the core Automated Cron module, or by other
means. The core Automated Cron module might not be suitable for some websites because:
• Each time someone accesses a page on the site, the module checks how long it has been since cron
maintenance tasks have last run, and then runs them if necessary. If no one visits the website for a
long time, cron maintenance tasks will not be run.
• Cron maintenance tasks are run after the page has been generated. This means there is less time for
the tasks to be run before various server timeouts are reached (for example, PHP execution timeout).
If this happens, the logs (see Section 12.4, “Concept: Log”) will show error messages that cron is
unable to complete.
• There is a small scalability cost associated with the core Automated Cron module. This is because
one of the web server’s processes is occupied (and can’t serve other web pages) until the cron main-
tenance tasks are complete.
3. If you want to use the core Automated Cron module, first make sure it is installed (it is installed with the
core Standard install profile; see Section 4.3, “Installing a Module” if it is not installed).
Next, configure the module to control how frequently cron maintenance tasks are run. In the Manage
administrative menu, navigate to Configuration > System > Cron (admin/config/system/cron). Select the
desired interval from the Run cron every field under Cron settings, and click Save configuration.
4. If you want to run cron maintenance tasks from outside the website, uninstall the core Automated Cron
module (see Section 4.4, “Uninstalling Unused Modules”). Next, find the cron URL. This URL is shown
in the Status report (see Section 12.5, “Concept: Status Report”), and in the Cron administration page (see
previous step). The URL looks like this: http://www.example.com/cron/0MgWtfB33FYbbQ5UAC3L0LL3RC0PT3RNUBZI
198
CHAPTER 13. SECURITY AND MAINTENANCE 13.3. CONCEPT: SECURITY AND REGULAR …
Whenever this URL is visited, cron maintenance tasks will run. Set up one of the following schedulers to
access this URL regularly:
Related concepts
Section 13.3, “Concept: Security and Regular Updates”
Videos
Configuring Cron Maintenance Tasks
Configuring Cron Maintenance Tasks
Additional resources
• Drush page ”Running Drupal cron tasks from Drush”
Attributions
Written and edited by Dave Hansen-Lange at Advomatic, Boris Doesborg, and Jennifer Hodgdon.
199
CHAPTER 13. SECURITY AND MAINTENANCE 13.4. KEEPING TRACK OF UPDATES
Related topics
• Section 13.4, “Keeping Track of Updates”
• Section 13.5, “Updating the Core Software”
• Section 13.6, “Updating a Module”
Additional resources
• Drupal.org community documentation page ”Securing your site”
• ”Security advisories” on Drupal.org
Attributions
Written and edited by Boris Doesborg and Jennifer Hodgdon.
Prerequisite knowledge
Section 13.3, “Concept: Security and Regular Updates”
Steps
There are a few different ways to receive notifications of security releases:
• Highly critical security announcements will be displayed on the administration pages of your website. A
link will be shown to the announcement on Drupal.org which explains when and how you can update
your website.
200
CHAPTER 13. SECURITY AND MAINTENANCE 13.5. UPDATING THE CORE SOFTWARE
• In the Manage administrative menu, navigate to Reports > Available updates > Settings. Enter the email
addresses to be notified when updates are available. You can also specify whether you want daily or
weekly updates. Click Save configuration.
• Subscribe to the security announcements email list. To subscribe, log in to Drupal.org, go to your user
profile page and subscribe to the security newsletter on the Edit > My newsletters tab.
• Follow @drupalsecurity on Twitter.
• Subscribe to RSS feeds for core security updates, contributed project updates and public service announce-
ments.
Related concepts
• Section 13.3, “Concept: Security and Regular Updates”
• Section 13.5, “Updating the Core Software”
Videos
Keeping Track of Updates
Keeping Track of Updates
Additional resources
• ”Security advisories” on Drupal.org
Attributions
Written by Sarah German at Advomatic.
Site prerequisites
• If you want to use Drush, Drush must be installed. See Section 3.2, “Concept: Additional Tools”.
• If your site is live, you should test this process in a development environment before running it on your
production site. See Section 11.8, “Making a Development Site”.
201
CHAPTER 13. SECURITY AND MAINTENANCE 13.5. UPDATING THE CORE SOFTWARE
Steps
1. Make a complete backup of your site. Refer to Section 12.3, “Concept: Data Backups”.
2. Open settings.php (/sites/default/settings.php) in any plain text editor. Find the line with the $settings[update_free_access
variable. By default, it is set to ”FALSE” due to security reasons. Change the setting to ”TRUE”:
$settings[’update_free_access’] = TRUE;
3. Disable any caching technique (memcache, varnish, and so on) your application might be using.
4. Put your site in maintenance mode. See Section 11.2, “Enabling and Disabling Maintenance Mode”.
5. If you are using Composer to manage dependencies, skip the next six steps, and instead see Section 3.5,
“Using Composer to Download and Update Files” for instructions on downloading updated files. Con-
tinue with the update.php step.
6. Download the tar.gz or zip file archive for the latest version of Drupal core for the branch you are currently
using (such as 8.x or 9.x) from Drupal.org Drupal Core Downloads. See Section 3.4, “Preparing to Install”
for more details on how to find the latest version.
7. Upload the archive file to your web hosting server.
8. Extract the archive file to a temporary directory on your server (should be outside the directory where
the site is hosted). Your hosting control panel’s file manager should provide a way to extract the files. Or,
if you have terminal access to your hosting server (running Linux), you can use a command like:
tar -xzf drupal-8.3.2.tar.gz
9. In your site hosting directory, delete the core and vendor directories, and all files that are not in a sub-
directory, including .htaccess, composer.json, and autoload.php. Don’t delete custom and customized files
because you may end up losing the custom functionality stored in them.
10. Copy the core and vendor directories and the non-custom/non-customized files that you deleted in the
preceding step from the temporary directory to your site directory.
11. Run the update.php script using either of the following:
12. If you get any error or warning, re-run the update.php script again till all the updates have been completed
successfully.
13. Open settings.php (/sites/default/settings.php) in a text editor. Find the line with the $settings[update_free_access]
variable and update it to ”FALSE”:
$settings[’update_free_access’] = FALSE;
14. Click Administration pages to return to the administration section of your site.
15. Take your site out of maintenance mode. See Section 11.2, “Enabling and Disabling Maintenance Mode”.
16. Clear the cache. See Section 12.2, “Clearing the Cache”.
17. Re-enable any caching technique you disabled at Step 3.
18. You should have the updated version running. You can verify the current version of your software by
checking the Status report (see Section 12.5, “Concept: Status Report”).
202
CHAPTER 13. SECURITY AND MAINTENANCE 13.6. UPDATING A MODULE
Related concepts
Section 12.5, “Concept: Status Report”
Videos
Updating the Core Software
Updating the Core Software
Additional resources
• ”Drupal Core Downloads” page on Drupal.org
Attributions
Written and edited by Surendra Mohan, Boris Doesborgh, and Jojy Alphonso at Red Crackle.
Prerequisite knowledge
• Section 13.3, “Concept: Security and Regular Updates”
• Section 13.1, “Concept: Cron”
Site prerequisites
• A contributed module has been installed and there is an update available for it. See Section 11.3, “Down-
loading and Installing a Module from Drupal.org” and Section 13.4, “Keeping Track of Updates”.
• If your site is live, you should test this process in a development environment before running it on your
production site. See Section 11.8, “Making a Development Site”.
• You have created a full-site backup. See Section 12.3, “Concept: Data Backups”.
• If you want to use the user interface, the core Update Manager module must be installed. See Section 4.3,
“Installing a Module” for instructions on installing core modules.
203
CHAPTER 13. SECURITY AND MAINTENANCE 13.6. UPDATING A MODULE
Steps
Before you start, check for module-specific update instructions. This is typically necessary while updating
modules that involve the usage of third-party libraries. Read and understand all module-specific requirements
before proceeding with the updates. To find instructions, check the module’s project page Read Documentation
link.
To view further instructions, download the tar.gz or .zip file from the project page to your local computer.
Unzip the file and look for README.txt, INSTALL.txt, and UPGRADE.txt that come with the module’s installa-
tion file. Also, review the release notes on the project page by clicking the version number you’re downloading.
You can use the administrative interface to update a contributed module. If you are updating a custom
module rather than a contributed module, if you see a message saying Installing modules and themes requires
FTP access to your server, or if the steps below do not work to obtain the new module files, follow the steps in
Section 11.6, “Manually Downloading Module or Theme Files”. You can then continue here with step 6 in the
instructions for the administrative interface below.
If you are using Composer to manage the files in your site, follow the steps in Section 3.5, “Using Composer
to Download and Update Files” to update the files, then continue here with step 5 in the instructions for the
administrative interface below.
204
CHAPTER 13. SECURITY AND MAINTENANCE 13.7. UPDATING A THEME
4. Click Continue.
5. Click Run database updates. If you obtained the new module files manually, start with this step, and reach
the database updates page by typing the URL example.com/update.php in your browser.
6. Click Continue and apply all updates. The database update scripts will be executed.
7. Click Administration pages to return to the administration section of your site.
8. Take your site out of maintenance mode. See Section 11.2, “Enabling and Disabling Maintenance Mode”.
9. Clear the cache (refer to Section 12.2, “Clearing the Cache”).
Videos
Updating a Module
Updating a Module
Attributions
Adapted by Boris Doesborgh, and Sarah German at Advomatic, from ”Update modules”, copyright 2000-
2024 by the individual contributors to the Drupal Community Documentation.
Prerequisite knowledge
• Section 13.3, “Concept: Security and Regular Updates”
• Section 13.1, “Concept: Cron”
Site prerequisites
• A contributed theme has been installed and there is an update available for it. See Section 11.5, “Down-
loading and Installing a Theme from Drupal.org” and Section 13.4, “Keeping Track of Updates”.
• If your site is live, you should test this process in a development environment before running it on your
production site. See Section 11.8, “Making a Development Site”.
• You have created a full site backup. See Section 12.3, “Concept: Data Backups”.
• If you want to use the user interface, the core Update Manager module must be installed. See Section 4.3,
“Installing a Module” for instructions on installing core modules.
205
CHAPTER 13. SECURITY AND MAINTENANCE 13.7. UPDATING A THEME
Steps
You can use the administrative interface to update a contributed theme. If you are updating a custom theme
rather than a contributed theme, if you see a message saying Installing modules and themes requires FTP access
to your server, or if the steps below do not work to obtain the new theme files, follow the steps in Section 11.6,
“Manually Downloading Module or Theme Files”, and then continue with step 5 in the instructions for admin-
istrative interface below.
If you are using Composer to manage the files in your site, follow the steps in Section 3.5, “Using Composer
to Download and Update Files” to update the files, then continue here with step 6 in the instructions for the
administrative interface below.
3. Find and check the theme in the list. Click Download these updates for the theme.
4. Click Continue.
5. Click Run database updates. If you obtained the new theme files manually, start with this step, and reach
the database updates page by typing the URL example.com/update.php in your browser.
6. Click Continue to run the updates. The database update scripts will be executed.
7. Click Administration pages to return to the administration section of your site.
8. Take your site out of maintenance mode. See Section 11.2, “Enabling and Disabling Maintenance Mode”.
9. Clear the Drupal cache (refer to Section 12.2, “Clearing the Cache”).
206
CHAPTER 13. SECURITY AND MAINTENANCE 13.7. UPDATING A THEME
Videos
Updating a Theme
Updating a Theme
Attributions
Written by Boris Doesborg.
207
Chapter 14
Final Thoughts
Attend an event There are both regional and international Drupal events held around the world. See the
”DrupalCon” page on Drupal.org to find international events, and the ”Event Calendar” on groups.drupal.org
or drupical.com to find regional events.
Join a local group There are Drupal user groups all around the world. Many of them have regular meetings,
which you can attend to learn more about Drupal and connect to other Drupal users. Find local user
groups on groups.drupal.org.
Participate in a topical or language group There are also interest groups for a wide range of topics, which
have on-line discussion forums. Find topical groups on groups.drupal.org. Many languages have their
own websites too; you can find them on the ”Language-specific communities” page on Drupal.org.
Chat online The Drupal project uses Slack and DrupalChat for on-line chatting. There are regional, topi-
cal, and general-purpose chat groups available. Find out more on the ”Slack” page on Drupal.org and
”DrupalChat” page on Drupal.org.
Report a problem See below.
Contribute You can contribute your time and expertise to the community in many ways, such as:
• Developing modules or themes. See the ”Contribute to Development” page on Drupal.org, or im-
proving them (using the issue queues for existing projects).
• Translating the user interface. See localize.drupal.org.
• Writing documentation. See ”Contribute to Documentation” on Drupal.org.
• Answer Support questions. See Section 14.2, “Getting Support”.
209
CHAPTER 14. FINAL THOUGHTS 14.2. GETTING SUPPORT
Related topics
Section 14.2, “Getting Support”
Additional resources
• ”Code of Conduct” on Drupal.org
• ”Event Calendar” on groups.drupal.org or drupical.com
• ”Community page on Drupal.org
• groups.drupal.org
• ”Slack” page on Drupal.org
• ”DrupalChat” page on Drupal.org
Attributions
Written by Jennifer Hodgdon, and Joe Shindelar at Drupalize.Me.
210
CHAPTER 14. FINAL THOUGHTS 14.3. LEARNING MORE
Related topics
• Section 14.3, “Learning More”
• Section 14.1, “Connecting with the Community”
Additional resources
• ”Support” page on Drupal.org
• ”Drupal Marketplace” on Drupal.org
Attributions
Written by Jennifer Hodgdon.
211
CHAPTER 14. FINAL THOUGHTS 14.3. LEARNING MORE
”Drupal Planet” page on Drupal.org An aggregation of blog posts about Drupal from around the web, posted
by blogging members of the Drupal community who have applied for inclusion. Topics range from pro-
gramming to site building to Drupal news.
Groups, events, and meetups See Section 14.1, “Connecting with the Community” for more about topical,
regional, and language groups, as well as local, regional, and international events.
”Training Marketplace” page on Drupal.org The Marketplace lists paid training providers. For free training,
check whether events include training sessions; there are also free or very low-cost training events listed
on the ”Global Training Days” page on Drupal.org.
Support sites See Section 14.2, “Getting Support” to locate support forums; searching them can be useful for
learning about specific topics.
Attributions
Written by Jennifer Hodgdon, and Joe Shindelar at Drupalize.Me.
212
Chapter 15
Glossary
Ajax
A web technology used to exchange data with a server to dynamically update parts of a web page (for
example, forms) without needing entire page reloads.
Alias
A user-friendly name to replace the internal path that the system assigns to a URL on the site. For example,
you might assign an alias of /about to the About page on your site, to replace the internal path /node/5.
This would give the page a URL of http://example.com/about instead of http://example.com/node/5. See
Section 5.1, “Concept: Paths, Aliases, and URLs” for more information.
Anonymous
A person (user) interacting with the site who is not logged in. See Section 7.1, “Concept: Users, Roles,
and Permissions” for more information.
Authenticated
A person (user) interacting with the site who is logged in. See Section 7.1, “Concept: Users, Roles, and
Permissions” for more information.
Block
A chunk of content (text, images, links, etc.) that can be displayed on a page of a site. Blocks are displayed
in regions. See Section 8.1, “Concept: Blocks” for more information.
Breakpoint
Breakpoints are used to separate the height or width of browser screens, printers, and other media out-
put types into steps. A responsive site adjusts its presentation at these breakpoints. See Section 6.14,
“Concept: Responsive Image Styles” for more information.
Bundle
Synonym for Entity subtype.
Cache
The site’s internal cache stores the output of time-consuming calculations, such as computing output for
an HTML page request, and then retrieves them instead of recalculating the next time they are needed.
External caching systems can also be used on the web server to speed up a site’s response. See Section 12.1,
“Concept: Cache” for more information on the internal cache.
Coding standards
Coding standards are the rules for programmers that define best practices, formatting, and various other
rules, so that everyone uses the same conventions and has the same expectations when they see code. See
Section 3.2, “Concept: Additional Tools” for more information.
213
CHAPTER 15. GLOSSARY
Composer
The PHP dependency manager used by Drupal, Drush, Drupal console, the Symfony framework and oth-
ers. It is the preferred means of installing Drupal projects. See Section 3.5, “Using Composer to Download
and Update Files” for more information.
CMS
Acronym for Content Management System.
Configuration
Information about your site that is not content, and is meant to be more permanent than state information,
such as the name of your site, the content types and views you have defined, etc. See Section 1.5, “Concept:
Types of Data” for more information.
Content
Information meant to be displayed on your site, such as text, images, downloads, etc. See also Configu-
ration and State. See Section 1.5, “Concept: Types of Data” for more information.
Content item
An item of content that is typically meant to be displayed as the main content of a page on your site. This
is an entity type. See Section 2.3, “Concept: Content Entities and Fields” for more information.
Content Management System (CMS)
A collection of tools designed to allow the creation, modification, organization, search, retrieval and re-
moval of information on a website. See Section 1.1, “Concept: Drupal as a Content Management System”
for more information.
Content type
An entity subtype for the content item entity type. Each content type is used for some particular purpose
on the site, and each has its own fields. For example, a site for a farmers market might have a content type
for simple pages, and another for a vendor listing page. See Section 2.3, “Concept: Content Entities and
Fields” for more information.
Contextual Filter (in a View)
Limits the data to be output in a view, based on the context of the view display, such as the full URL of
the page. See Section 9.2, “Concept: The Parts of a View” for more information.
Contextual link
A link to an administrative page for editing or configuring a feature of the site, shown in the context where
that feature is displayed. Example: a link to configure a menu that is shown when you hover your mouse
over the menu. See Section 4.1, “Concept: Administrative Overview” for more information.
Contributed
Modules, themes, and distributions that are not part of the Drupal core download, and that can be down-
loaded separately from the Drupal.org website.
Cron
On some operating systems, cron is a command scheduler application that executes commands or scripts
periodically. Your site defines periodic tasks, also known as cron tasks, that need to be triggered either by
an operating system cron scheduler, or internally. See Section 13.1, “Concept: Cron” for more information.
214
CHAPTER 15. GLOSSARY
Development site
Copy of the live website that is used for developing, updating, and testing the website. See Section 11.7,
“Concept: Development Sites” for more information.
Display (in a View)
Type of output of a view, for example a page, a block or a feed. See Section 9.2, “Concept: The Parts of a
View” for more information.
Distribution
A single download that provides a shortcut for setting up a specific type of site, such as a website for
a club or for e-commerce. A distribution contains Drupal core, along with contributed modules and/or
themes; many distributions also pre-configure the site or even create sample content upon installation.
See Section 1.4, “Concept: Distributions” for more information.
Drupal Association
Non-profit organization dedicated to supporting the Drupal project and community. See Section 1.6,
“Concept: The Drupal Project” for more information.
Drupal core
The files, themes, profiles, and modules included with the standard project software download. See
Section 1.1, “Concept: Drupal as a Content Management System” for more information.
Drupal console
Command line shell and scripting interface for Drupal. Comparable with Drush. See Section 3.2, “Con-
cept: Additional Tools” for more information.
Drush
Command line shell and scripting interface for Drupal. Comparable with Drupal console. See Section 3.2,
“Concept: Additional Tools” for more information.
Editorial Workflow
Process to create, review, edit, and publish content. Multiple people in different roles (for example content
creators and editors) can be part of the process. See Section 2.6, “Concept: Editorial Workflow” for more
information.
Entity
An item of either content or configuration data, although in common usage, the term often refers to
content entities. Examples include content items, custom blocks, taxonomy terms, and definitions of
content types; the first three are content entities, and the last is a configuration entity. See also Entity type,
Entity subtype, and Field. See Section 2.3, “Concept: Content Entities and Fields” for more information.
Entity subtype
Within a content entity type, a grouping of entities that share the same fields. For example, within the
content item entity type, a farmers market site might have subtypes (known as content types) for static
pages and vendor pages, each with its own group of fields. You may also see the term bundle used (espe-
cially in programmer documentation) as a synonym of entity subtype. See Section 2.3, “Concept: Content
Entities and Fields” for more information.
Entity type
The overall type of an entity; in common usage, it is only applied to a content entity. Examples in-
clude content types, taxonomy terms, and custom blocks. See Section 2.3, “Concept: Content Entities
and Fields” for more information.
Field
Data of a certain type that is attached to a content entity. For instance, on a farmers market site’s vendor
content type, you might have fields for an image, the vendor description, and a taxonomy term. See
Section 2.3, “Concept: Content Entities and Fields” for more information.
Field bundle
Synonym for Entity subtype.
215
CHAPTER 15. GLOSSARY
Field formatter
Configuration that defines how the data in a field is displayed. For example, a text field could be displayed
with a prefix and/or suffix, and it could have its HTML tags stripped out or limited. See also View mode
and Field widget. See Section 6.10, “Concept: View Modes and Formatters” for more information.
Field widget
Configuration that defines how someone can enter or edit data for a field on a data entry form. For
example, a text field could use a single-line or multi-line entry box, and there could be a setting for the size
of the box. See also Field formatter. See Section 6.8, “Concept: Forms and Widgets” for more information.
216
CHAPTER 15. GLOSSARY
Path
The unique, last part of the internal URL that the system assigns to a page on the site, which can be a
visitor-facing page or an administrative page. For example, the internal URL for the About page on your
site might be http://example.com/node/5, and in this case, the path is node/5. See also Alias. See Section 5.1,
“Concept: Paths, Aliases, and URLs” for more information.
Permission
The ability to perform some action on the site, such as editing a particular type of content, or viewing user
profiles. See also Role. See Section 7.1, “Concept: Users, Roles, and Permissions” for more information.
Reference field
A field that represents a relationship between an entity and one or more other entities, which may be the
same entity type or a different type. For example, on a farmers market site, a recipe content item might
have a reference field to the vendor (also a content item) that posted the recipe. Taxonomy term fields
are also reference fields. See Section 6.4, “Concept: Reference Fields” for more information.
Region
A defined area of a page where content can be placed, such as the header, footer, main content area, left
sidebar, etc. Regions are defined by themes, and the content displayed in each region is contained in
blocks. See Section 2.1, “Concept: Regions in a Theme” for more information.
Relationship (in a View)
Expansion of the data that is displayed in a view, by relating the base content to other content entities.
See Section 9.2, “Concept: The Parts of a View” for more information.
Repository
Location where a version control system stores all the files and directories for a project. See Section 3.2,
“Concept: Additional Tools” for more information.
Responsive
A site or theme is said to be responsive if it adjusts its presentation in response to the size of the browser
screen, printer, or other media output type. See also Breakpoint. See Section 6.14, “Concept: Responsive
Image Styles” for more information.
Revision
A record of the past or present state of a content entity, as it is edited over time. See Section 2.6, “Concept:
Editorial Workflow” for more information.
Role
A named set of permissions that can be applied to a user account. See Section 7.1, “Concept: Users, Roles,
and Permissions” for more information.
Security update
An update that fixes a security-related bug, such as a hacking vulnerability. See Section 13.3, “Concept:
Security and Regular Updates” for more information.
Session
Information about individual site visitors’ interactions with the site, such as whether they are logged in
and their cookies. See Section 1.5, “Concept: Types of Data” for more information.
Staging site
Copy of the live website that can be used for testing, or presenting the changes to the client for approval.
See Section 11.7, “Concept: Development Sites” for more information.
State
Information of a temporary nature about the current state of your site, such as the time when cron was
last run, etc. See also Content and Configuration. See Section 1.5, “Concept: Types of Data” for more
information.
217
CHAPTER 15. GLOSSARY
Taxonomy
The process of classifying content. See Section 6.5, “Concept: Taxonomy” for more information.
Taxonomy term
A term used to classify content, such as a tag or a category. See also Vocabulary. See Section 6.5, “Concept:
Taxonomy” for more information.
Text format
Configuration that defines the processing that happens to user-entered text before it is shown in the
browser. This might include stripping or limiting HTML tags, or turning URLs into links. See Section 6.15,
“Concept: Text Formats and Editors” for more information.
Theme
Software and asset files (images, CSS, PHP code, and/or templates) that determine the style and layout of
the site. The Drupal project distinguishes between core and contributed themes. See Section 1.3, “Concept:
Themes” for more information.
UI
Acronym for User Interface.
Update
A newer version of your site’s software, either Drupal core or a module or theme. See also Security update.
See Section 13.3, “Concept: Security and Regular Updates” for more information.
URL
A web page’s unique address on the web. For example https://example.com/node/7. See Section 5.1,
“Concept: Paths, Aliases, and URLs” for more information.
User
A person interacting with the site, either logged-in or anonymous. See Section 7.1, “Concept: Users, Roles,
and Permissions” for more information.
User interface
The text, styles, and images that are visible on a site, separated logically into the user interface for site
visitors and the administrative user interface.
User one (User 1)
The initial user account that is created when you install the site (whose ID number is 1). It automatically
has all permissions, even if it is not assigned an administrative role. See Section 7.2, “Concept: The User
1 Account” for more information.
Version Control System
Software that keeps copies of files and revision history in a repository, and allows you to add, delete, and
update files. See Section 3.2, “Concept: Additional Tools” for more information.
View
A formatted listing of data; typically, the data comes from content entities. For example, on a farmers
market site, you might create a content item for each vendor. You could then make view that generates a
listing page that shows a thumbnail image and short description of each vendor, linking to the full-page
content item. Using the same data, you could also make a view that generates a new vendors block, which
would show information from the most recently added vendors. See Section 2.4, “Concept: Modular
Content” for more information.
View mode
A set of field formatter configuration for all of the fields of a content entity, some of which may be hidden.
Each entity subtype can have one or more view modes defined; for example, content types typically have
Full and Teaser view modes, where the Teaser view mode displays fewer or trimmed-down fields. See
Section 6.10, “Concept: View Modes and Formatters” for more information.
218
CHAPTER 15. GLOSSARY
Vocabulary
A group of taxonomy terms to choose from when classifying content in a particular way, such as the list
of all of the vendor categories on a farmers market site. Technically, vocabularies are the entity subtype
for the taxonomy term entity type. See Section 6.5, “Concept: Taxonomy” for more information.
Widget
See Field widget.
Wizard
A web form that allows you to fill in a few values, and creates something with sensible defaults based on
the values you chose. For example, there are wizards for creating views of different types. See Section 9.3,
“Creating a Content List View” for more information.
WYSIWYG
Acronym for What You See is What You Get, meaning a method for editing content where what you see on
the editing screen closely resembles the final product. See Section 6.16, “Configuring Text Formats and
Editors” for more information.
Workflow
See Editorial Workflow.
XSS
Acronym for Cross Site Scripting.
219
Appendix A
Appendix
• The glossary was written and adapted by Jennifer Hodgdon, with parts from ”Glossary”, ”Overview
of Configuration (vs. other types of information)”, and ”Working with breakpoints in Drupal”, each
copyright 2000-2024 by the individual contributors to the Drupal Community Documentation.
• The index was improved and curated by Anna van Raaphorst.
• Antje Lorch
• Balu Ertl
• Boris Doesborg
• Charles Leverington
221
APPENDIX A. APPENDIX A.1. GUIDE-WIDE ATTRIBUTIONS
• chirag shah
• Grant Dunham
• Jennifer Hodgdon
• Joe Shindelar at Drupalize.Me
• Jojy Alphonso at Red Crackle — who copy edited the vast majority of the User Guide
Images
Most of the images in the guide are screen captures from the Drupal software, generated by software written
by Jennifer Hodgdon.
The word Drupal, the Druplicon logo (which appears as part of several images throughout the guide), and
the Drupal wordmark logo (which is part of the cover image), are registered trademarks of Dries Buytaert).
The cover image is a CC BY-SA 2.0 licensed illustration by Amanda Luker at Advomatic.
The Anytown Farmers Market logo, which appears as part of several images throughout the guide, is a CC
BY-SA 2.0 licensed illustration by Justin Harrell at Drupalize.Me.
The honey bee image, which appears as part of several images throughout the guide, is a public domain
image by John Severns at the English Wikipedia project via Wikimedia Commons.
The farm image, which appears as part of several images throughout the guide, is a public domain image
by Xianmin Chang via Wikimedia Commons.
The salad image, which appears as part of several images throughout the guide, is a public domain image
by Yinan Chen via Wikimedia Commons.
The carrot image, which appears as part of several images throughout the guide, is public domain image
K11611-1 by Stephen Ausmus at the Agricultural Research Service of the United States Department of Agricul-
ture via Wikimedia Commons.
222
Index
A definition, 213
Account setting overview, 105
configuring, 45 Bug
Admin Toolbar module reporting, 199, 209
downloading, 164 Bundle
installing, 164 definition, 213
Administration
overview, 35 C
Administrative interface Cache
using to update the core software, 201 clearing, 190
Administrative menu definition, 213
overview, 35, 57 overview, 189
Administrative user account rebuilding, 190
overview, 109 Chatting online, 209, 211
Ajax CKEditor module
definition, 213 configuring, 106
Alias CKEditor text editor
definition, 213 default assignment to text format, 106
overview, 51 CMS (Content Management System)
Anonymous definition, 214
definition, 213 overview, 1
Anonymous user Coder
overview, 109 definition, 213
Apache web server Coder tool
version requirements, 19 overview, 20
Appearance menu link Color scheme
administrative menu, 35 configuring, 47
Attributions for this document, 221 Comment entity type
Authenticated overview, 12
definition, 213 Comment module
Authenticated user entity type, 12
overview, 109 Community
Author connecting with, 209
assigning, 121 Composer
Automated Cron module definition, 213
configuring, 197 Composer tool
overview, 197 overview, 20
using to download modules, 24
B using to download the core software, 24
Backup using to download themes, 24
overview, 192 Composite page
Basic page creating with modular content, 14
creating, 52 Configuration
Block as a type of data, 5
creating, 125 copying, 180
creating from a view, 143 definition, 214
definition, 213 deploying, 180
entity type, 12 synchronizing between development and live site,
overview, 125 183
placing in a region, 127 translating, 17, 154
Breadcrumb region Configuration Manager module
overview, 9 using to synchronize the configuration between a
Breakpoint development and live site, 183
223
INDEX INDEX
224
INDEX INDEX
225
INDEX INDEX
226
INDEX INDEX
227
INDEX INDEX
228
INDEX INDEX
229
INDEX INDEX
230
INDEX INDEX
V X
VCS (Version Control System) XSS (Cross Site Scripting)
definition, 218 definition, 219
Version Control System (VCS) XSS (Cross-site scripting)
definition, 218 preventing, 106
View
adding block display to, 143
and modular content, 14
contextual filters part, 132
creating, 133
231