I need a help to install multi-site setup using only Drush that have multiple/different databases.I have already installed a site using drush but when I do the same steps for install another site into the sites folder using drush it gives me an error to delete previous database. I want instead to install another site that having same code base but different database.

  1. Install site in /var/www/html/abc
  2. Install another in /var/www/abc/sites/xyz.com

Gives error.

1 Answer 1



drush site-install --db-url=mysql://USER:PASS@localhost/DATABASENAME --sites-subdir=sitename

You may also need to add --db-su and --db-su-pw if necessary to provide the right credentials to create the database if the user specified by USER:PASS does not have permissions to do this.

See drush help site-install for other useful optional options you might want to specify, e.g. site name, admin account details and so on.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.