Problem/Motivation

When installing Drupal on a server that hosts multiple sites (multisite with directory aliases, or multiple Drupal codebases side by side served by different vhosts), the installer gives no indication of where it is actually installing.

The "Choose language" page — and every subsequent installer step — shows only:

The Drupal version (e.g. Drupal 11.3.13)

The task list (Choose language, Choose profile, Verify requirements, …)

There is no visible feedback about:

The filesystem path (docroot) where Drupal is running (DRUPAL_ROOT)

The resolved multisite directory (sites/ or sites/default)

The current hostname that Drupal used to resolve the site directory

This makes it impossible to tell, from the UI alone, which site is being installed. The problem is amplified in these common scenarios:

Multisite with a misconfigured sites.php — a typo such as $site[...] instead of $sites[...] silently makes the mapping ineffective. Drupal then falls back to the automatic hostname-matching rule (or to sites/default), and the user has no way to notice from the installer that the intended directory was skipped.

Multiple Drupal codebases on the same server (/var/www/site1, /var/www/site2, or /home/user/project1, /home/user/project2) — each served by a different vhost. A misconfigured vhost means the installer runs from the wrong docroot, and there is no visible clue in the UI.

Debugging multisite directory resolution — when an alias is misspelled or a directory is missing, the installer silently uses default instead of the intended directory.

The only current workaround is to drop a temporary PHP file (e.g. whereami.php) into the docroot to print __DIR__ and $_SERVER['HTTP_HOST']. This is invasive, easy to forget, and potentially insecure if left in place.

Steps to reproduce

A single server hosts two Drupal codebases, each with its own web/ docroot, its own vendor/, and its own sites/ directory containing many multisite instances:

/home/user/project-a/web/          <- codebase A (docroot)
    sites/
        example.com/
        example.org/
        default/

/home/user/project-b/web/          <- codebase B (docroot)
    sites/
        client1.example.net/
        client2.example.net/
        default/

Each hostname is served by a different vhost pointing to one of the two docroots, and inside each codebase the multisite directory is resolved by sites.php and/or by hostname matching.

When an administrator opens https://example.com/core/install.php, the installer does not tell them:

  • whether the vhost is actually pointing at project-a or project-b;
  • whether the multisite directory resolved to sites/example.com or fell back to sites/default;
  • whether sites.php was parsed correctly (a typo such as $site[...] instead of $sites[...] silently disables the mapping).

Proposed resolution

Add a small informational banner to the installer page (rendered by install-page.html.twig) that displays:

sample

Remaining tasks

  • Add the three template variables in ThemePreprocess::preprocessInstallPage()
  • Render the banner in install-page.html.twig
  • Add a functional test asserting the variables are exposed on the install page
  • Decide whether to also expose the same information on the maintenance page (maintenance-page.html.twig)
  • Review the banner styling with the Claro maintainers
  • Add a CHANGELOG.txt entry (if applicable)
CommentFileSizeAuthor
#5 qqq.png62.87 KBafagioli
Screenshot_20261005_131800.png67.42 KBafagioli

Issue fork drupal-3628565

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

afagioli created an issue. See original summary.

afagioli’s picture

Version: main » 11.x-dev
Status: Active » Needs review
afagioli’s picture

Title: Multisite install: show where installing » More codebases, multisite install: show where installing
afagioli’s picture

Issue summary: View changes
StatusFileSize
new62.87 KB
afagioli’s picture