Needs review
Project:
Drupal core
Version:
main
Component:
other
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Jun 2026 at 22:18 UTC
Updated:
10 Jul 2026 at 17:57 UTC
Jump to comment: Most recent
It's impossible to use dr install on ddev without manipulating settings.php first.
$ dr install standard
Drupal is already installed. If you want to reinstall, remove sites/default/files and sites/default/settings.php.
This is not ddev specific. If you already have a configured database you run in to the same problem. In fact, you can start an install and cancel it mid-way through, then you're stuck.
Run dr install standard twice
Prompt the user to confirm if they want to proceed, or require --force or -f or similar.
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
mradcliffeUpdated parent issue to the meta, and I added a related link to an issue I created to improve install to let it install on any database driver. These may be related/duplicated, sorry.
Comment #3
quietone commented@mstrelan, thanks for making this issue!
Comment #4
mstrelan commentedI've submitted this as a feature request, however if this is meant to have parity with drush then this could be considered a bug.
Comment #7
balsamaComment #8
mradcliffeThe one issue here is that install currently only installs via sqlite so the following scenario will have confusing results:
1. Setup a Drupal environment with settings.php created with a real database connection, not SQLite.
2. Run
dr install standard.This will install with the existing database connection and not SQLite, which would be currently misleading because help is saying this isn't meant for production.
I think I am okay with this as long as setHelp is changed to clarify current usage.
This would be a quick win for local ddev environments for drupal 12 developers, and hosting providers with automated configuration, but not self-hosters.
What do you think?
Comment #9
balsamaDidn't realize the help text was so explicit. I just pushed a commit with this change to the help text:
Happy to tweak that again if anyone has suggestions.
Comment #10
xmacinfoWould it be better to use a drop (-d) flag to drop existing database?
Comment #11
rfay`drop` is a destructive operation, and may require extra privs (and the user may not have privs to recreate). The correct behavior of `ddev sql-drop` over the years is to delete all tables. That's a great approach. (Dropping the `db` database in DDEV is a terrible thing to do.
Comment #12
xmacinfo@ray I agree 100% with you. By drop I meant delete all tables.
But we could still use something like
dr install -dto (d)elete all tables before installation.Comment #13
xmacinfoScenario - Database has tables in it
dr install— issues an errordr install -d— deletes all tables and perform the installationComment #14
rfayDrush's `drush si -y` is good enough for me :) Has been for 20 years or something.
Comment #15
balsamaI'd argue to keep the scope here tight. As it stands, users who set up a DB connection before installing Drupal (as is the case on managed hosts and ddev) can't use dr to install Drupal. The current MR allows them to do just that without changing the default behavior for environments that don't have their DB connection defined.
Suggest opening a related issue to add a `db:drop` command that can be used in conjunction with this command for repeated installs.
Comment #16
balsamaI've made a few updates to MR: