---
url: 'https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/multisite'
title: 'Multisite | DXPR'
author:
  name: Jurriaan
  url: 'https://dxpr.com/users/jurriaan'
date: '2026-10-26T18:01:04+00:00'
copyright: 'Copyright DXPR. All rights reserved.'
type: article
summary: 'Multisite is a Drupal feature that runs independent sites, each with its own database, configuration and files, from one shared codebase.'
tags:
  - 'Drupal glossary'
image: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
published: true
og:
  site_name: DXPR
  updated_time: '2026-10-26T18:01:04+0000'
  'image:alt': 'DXPR, powered by Drupal: AI-powered Drupal for marketers.'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      '@type': FAQPage
      mainEntity:
        -
          '@type': Question
          name: 'Do I need a sites.php file for multisite?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>Yes. Core&#039;s INSTALL.txt says the file sites/sites.php must exist, and you create it by copying example.sites.php. In Drupal 11.4.10, DrupalKernel::findSitePath() returns sites/default straight away when that file is missing, so extra site folders are never looked at.</p>'
        -
          '@type': Question
          name: 'Do multisite sites share a database?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>No. The Drupal.org documentation says each site has its own database, configuration and files; only the codebase is shared. Content, users and configuration therefore stay separate unless your developer builds a deliberate connection between them.</p>'
        -
          '@type': Question
          name: 'How do I run a Drush command against one site of a multisite?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>Pass the site address with the --uri option, or -l for short. The Drush documentation describes it as a base URL for building links and selecting a multi-site, with a default of https://default. Example: drush --uri=https://sub.example.com config:export.</p>'
        -
          '@type': Question
          name: 'Can I map a development host name to a production site folder?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>Yes, with an alias in sites/sites.php. Its $sites array maps a key such as dev.drupal.org to a folder name such as example.com, using the format port, domain and path joined by dots. Core&#039;s example.sites.php lists several examples.</p>'
    -
      '@type': TechArticle
      headline: Multisite
      description: 'Multisite is a Drupal feature that runs independent sites, each with its own database, configuration and files, from one shared codebase.'
      image:
        '@type': ImageObject
        url: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
        width: '1200'
        height: '630'
      datePublished: '2026-10-26T18:01:04+0000'
      dateModified: '2026-10-26T18:01:04+0000'
      author:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      mainEntityOfPage: 'https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/multisite'
      articleSection: 'Drupal glossary'
    -
      '@type': WebPage
      '@id': 'https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/multisite'
      description: 'Multisite is a Drupal feature that runs independent sites, each with its own database, configuration and files, from one shared codebase.'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Home
            item: 'https://dxpr.com/'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
      inLanguage: en
---
[Help Center](/hc)/[Documentation](/hc/documentation) /[Learn Drupal](/hc/documentation/learn-drupal) /[Drupal glossary](/hc/documentation/learn-drupal/drupal-glossary) # Multisite

Multisite is a Drupal feature that runs independent sites, each with its own database, configuration and files, from one shared codebase.

 Learn DrupalDrupal glossary Last updated October 26, 2026

   ## In this guide

 Related terms

- [Configuration](/hc/documentation/learn-drupal/drupal-glossary/configuration)
- [Drush](/hc/documentation/learn-drupal/drupal-glossary/drush)
- [Module](/hc/documentation/learn-drupal/drupal-glossary/module)
- [Theme](/hc/documentation/learn-drupal/drupal-glossary/theme)
- [Composer](/hc/documentation/learn-drupal/drupal-glossary/composer)
- [Install profile](/hc/documentation/learn-drupal/drupal-glossary/install-profile)

 [All Drupal terms from A to Z](/hc/documentation/learn-drupal/drupal-glossary)

Multisite is a way to host more than one Drupal website from a single Drupal installation. You install core, modules and themes once, then add a folder under `sites` for each extra site. Which folder answers a request depends on the address that was asked for.

## How multisite works in Drupal 11

The Drupal.org multisite documentation, written for Drupal 8 and later, describes the sites as separate and independent, each with its own database, configuration, files and base domain or URL.

Three pieces of core 11.4.10 make it work:

- **`sites/sites.php`.** The file switches the feature on. Core's `INSTALL.txt` tells you to copy `example.sites.php` to that name. Without it, `DrupalKernel::findSitePath()` always returns `sites/default`.
- **One folder per site.** Each extra site gets a subfolder of `sites` with its own `settings.php`. The easiest start, according to `INSTALL.txt`, is to copy `default.settings.php` from `sites/default`.
- **Site-specific code.** A site folder can hold its own `modules` and `themes` directories next to the shared [modules](/hc/documentation/learn-drupal/drupal-glossary/module) and [themes](/hc/documentation/learn-drupal/drupal-glossary/theme) in the web root. Code in a site folder is not available to the other sites.

Install profiles work the other way round. The README in the web root's `profiles` directory says profiles placed there are available to every site during its first installation, so each site can start from a different [install profile](/hc/documentation/learn-drupal/drupal-glossary/install-profile).

Folder names come from the site's address. `INSTALL.txt` says to leave out `www.` if visitors can reach the site without it. A port counts as the deepest subdomain, so `http://www.example.com:8080/` can load from `sites/8080.www.example.com/`. A path becomes a dot-separated suffix, as in `sites/sub.example.com.site3`.

## Example

Three sites share one codebase:

```
sites/sites.php
        sites/default/settings.php
        sites/example.com/settings.php
        sites/sub.example.com.site3/settings.php
```

For the request `www.sub.example.com/site3`, `INSTALL.txt` says Drupal checks the folders in this order and uses the first one that has a `settings.php`:

```
sites/www.sub.example.com.site3
        sites/sub.example.com.site3
        sites/example.com.site3
        sites/www.sub.example.com
        sites/sub.example.com
        sites/example.com
        sites/default
```

Here the second entry matches, so the request is served by the `site3` site.

## Common mistakes

- **Leaving `trusted_host_patterns` too narrow.** The comments in `default.settings.php` say that on a multisite you should list every host pattern the sites use.
- **Running Drush without `--uri`.** The command then runs against the default site, not the one you meant.
- **Expecting one configuration export for all sites.** Databases are separate, so each site needs its own [configuration](/hc/documentation/learn-drupal/drupal-glossary/configuration) export and import.

## For marketing and content teams

With multisite, brands or country sites can look and behave differently while one development team maintains the code. The trade-off is the shared codebase: when your developer updates a module through [Composer](/hc/documentation/learn-drupal/drupal-glossary/composer), the new code reaches every site in that installation. Ask which sites share a codebase before you request a feature that only one of them needs.

## Sources

- [Drupal.org: Multisite Drupal](https://www.drupal.org/docs/getting-started/multisite-drupal)
- [Drupal.org: Multisite folder structure in Drupal](https://www.drupal.org/docs/getting-started/multisite-drupal/multisite-folder-structure-in-drupal)
- [Drupal core 11.4.10 source: INSTALL.txt, Multisite configuration section (git.drupalcode.org)](https://git.drupalcode.org/project/drupal/-/blob/11.4.10/core/INSTALL.txt)
- [Drupal core 11.4.10 source: DrupalKernel::findSitePath() (git.drupalcode.org)](https://git.drupalcode.org/project/drupal/-/blob/11.4.10/core/lib/Drupal/Core/DrupalKernel.php)
- [Drupal core 11.4.10 source: example.sites.php and default.settings.php (git.drupalcode.org)](https://git.drupalcode.org/project/drupal/-/tree/11.4.10/sites)
- [Drupal core 11.4.10 source: profiles/README.txt (git.drupalcode.org)](https://git.drupalcode.org/project/drupal/-/blob/11.4.10/profiles/README.txt)
- [Drush: config:export command](https://www.drush.org/13.x/commands/config_export/)

## Questions about Drupal multisite

### Do I need a sites.php file for multisite?

Yes. Core's INSTALL.txt says the file `sites/sites.php` must exist, and you create it by copying `example.sites.php`. In Drupal 11.4.10, `DrupalKernel::findSitePath()` returns `sites/default` straight away when that file is missing, so extra site folders are never looked at.

### Do multisite sites share a database?

No. The Drupal.org documentation says each site has its own database, configuration and files; only the codebase is shared. Content, users and configuration therefore stay separate unless your developer builds a deliberate connection between them.

### How do I run a Drush command against one site of a multisite?

Pass the site address with the `--uri` option, or `-l` for short. The Drush documentation describes it as a base URL for building links and selecting a multi-site, with a default of `https://default`. Example: `drush --uri=https://sub.example.com config:export`.

### Can I map a development host name to a production site folder?

Yes, with an alias in `sites/sites.php`. Its `$sites` array maps a key such as `dev.drupal.org` to a folder name such as `example.com`, using the format port, domain and path joined by dots. Core's `example.sites.php` lists several examples.

 ## Cite this definition

"Multisite." DXPR Drupal glossary, https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/multisite. Last updated October 26, 2026.

 Copy  ## Related terms

- [Configuration](/hc/documentation/learn-drupal/drupal-glossary/configuration)
- [Drush](/hc/documentation/learn-drupal/drupal-glossary/drush)
- [Module](/hc/documentation/learn-drupal/drupal-glossary/module)
- [Theme](/hc/documentation/learn-drupal/drupal-glossary/theme)
- [Composer](/hc/documentation/learn-drupal/drupal-glossary/composer)
- [Install profile](/hc/documentation/learn-drupal/drupal-glossary/install-profile)

[All Drupal terms from A to Z](/hc/documentation/learn-drupal/drupal-glossary)