Theme
A Drupal theme is an installable extension that renders the markup and styling of pages; one theme serves visitors and another can serve the admin pages.
A theme is the part of a Drupal site that controls how it looks. It is a folder with a machine_name.info.yml file, Twig templates, CSS and JavaScript libraries and, if needed, PHP code. The info file also declares the regions where blocks can be placed on a page.
How themes work in Drupal 11
The info file is the only required piece. The Drupal.org guide lists name, type (always theme), base theme and core_version_requirement as the minimum. Optional keys include libraries, which attach CSS and JavaScript, and regions. Markup comes from Twig templates. Olivero, for example, ships a breadcrumb.html.twig headed "Theme override for a breadcrumb trail" next to the default one in the System module.
A site has one default theme for visitors and, optionally, a separate administration theme. Both are stored in the system.theme configuration, in the default and admin keys. In the released Drupal 11.4 line, 11.4.10 and 11.4.11 when checked on 26 October 2026, the Standard installation profile sets Olivero as default and Claro as administration theme. In 11.5.0-beta1, a beta released on 15 October 2026, it sets Default Admin for both keys, and Olivero and Claro are marked deprecated. Themes can also stack: a sub-theme names a parent in base theme and inherits its templates and function implementations.
Block placement belongs to a theme. When a theme that brings no block placements of its own is installed, Drupal copies the default theme's blocks to it, and moves any block whose region the new theme lacks into its default region.
Example
To start a custom theme, generate it from the Starterkit theme instead of copying a core theme. From Drupal 11.4 the command is:
vendor/bin/dr generate-theme my_new_theme
The command writes the new theme to the themes directory. Go to Manage › Appearance, find it under Uninstalled themes and click Install and set as default.
Common mistakes
- Editing a core theme. The Olivero info file warns that its markup and assets will change between minor releases. It advises copying the whole theme under a new name, or sub-theming it for minor tweaks only.
- Choosing Stable 9 as a base for new work. Its info file hides it, and from Drupal 11.4 it also marks its lifecycle as deprecated.
- Forgetting that blocks are per theme. After you switch themes, review the block layout of the new theme.
For marketing and content teams
The default theme sets the look of every public page at once, so changing it is a site-wide decision. Content stays in place, but header, footer and sidebar blocks can land in different regions or in none. Ask your developer to rehearse a theme change on a copy of the site before it goes live.
With DXPR
DXPR Theme is a Drupal theme with its own theme settings under Appearance and its own regions, such as Hero Region, Content Top and Content Bottom. See DXPR Theme.
Sources
- Drupal.org: Defining a theme with an .info.yml file
- Drupal User Guide: Installing a theme
- Drupal.org: Starterkit theme
- Olivero theme info file, Drupal 11.4.0 source
- ThemeExtensionList, Drupal 11.4.0 source
- Olivero breadcrumb template, Drupal 11.4.0 source
- Stable 9 theme info file, Drupal 11.4.0 source
- ThemeAdminForm, Drupal 11.4.0 source
- Standard profile theme configuration, Drupal 11.4.0 source
- Standard profile theme configuration, Drupal 11.4.11 source
- Standard profile theme configuration, Drupal 11.5.0-beta1 source
- Olivero theme info file, Drupal 11.5.0-beta1 source (lifecycle: deprecated)
- Claro theme info file, Drupal 11.5.0-beta1 source (lifecycle: deprecated)
- BlockHooks, Drupal 11.4.0 source