Needs review
Project:
Drupal core
Version:
main
Component:
CLI system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2026 at 11:35 UTC
Updated:
13 Nov 2026 at 11:40 UTC
Jump to comment: Most recent
On a multisite, dr uses sites/default in cases where another site was requested:
dr cache:rebuild ignores --url, DRUPAL_URI and DRUPAL_DEV_SITE_PATH. It builds its request from globals.--url and DRUPAL_URI never select a site directory. Request::create() leaves SCRIPT_NAME empty, so DrupalKernel::findSitePath() matches nothing.--url=example.com, as in the option's help text) is parsed as a path.Install sites/default and sites/dev, add sites/sites.php, run dr cache:rebuild --url=https://dev. The caches of sites/default are rebuilt.
DrupalApplication::getSitePath(), used by bootstrap() and cache:rebuild. It sets a script name from the URI path before calling findSitePath().drupal_rebuild() takes an optional $site_path.DrupalApplication::getUri() prepends http:// when the URI has no scheme.drupal_rebuild() gains an optional third parameter.
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
Comment #3
moshe weitzman commentedComment #4
moshe weitzman commented