Active
Project:
Drupal core
Version:
main
Component:
CLI system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2026 at 13:13 UTC
Updated:
9 Nov 2026 at 13:14 UTC
Jump to comment: Most recent
"dr cache:rebuild" only works on the site installed into "sites/default".
This was discovered whilst running Playwright tests on sites installed using the test site installer - when "sites/default" doesn't exist it gives the error `The specified database connection is not defined: default`, and when it does exist it clears the caches on the default site instead of the specified one.
composer create-project drupal/recommended-project:^11.4 test
cd test
mkdir -p web/sites/foo
DRUPAL_DEV_SITE_PATH=sites/foo vendor/bin/dr install minimal -n
DRUPAL_DEV_SITE_PATH=sites/foo vendor/bin/dr cache:rebuild
# and for URL
printf "<?php\n\$sites['foo.localhost'] = 'foo';\n" > web/sites/sites.php
vendor/bin/dr --url=https://test.ddev.site cache:rebuild
tbc
tbc
None
None
None
None
n/a
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 #2
justafish