site:install¶
Install Drupal along with modules/themes/configuration/profile.
Examples¶
drush si demo_umami --locale=da
. (Re)install using the Umami install profile. Set default language to Danish.drush si --db-url=mysql://user:pass@localhost:port/dbname?module=mysql#tableprefix
. Install on MySQL using the specified DB params.drush si --db-url=sqlite://sites/example.com/files/.ht.sqlite?module=sqlite#tableprefix
. Install on SQLite, using database file sites/example.com/files/.ht.sqlitedrush si --db-url=sqlite://:memory:?module=sqlite
. Install using SQLite in-memory database, that is not persisted. Useful for testing.drush si --account-pass=mom
. Re-install with specified uid1 password.drush si --existing-config
. Install based on the yml files stored in the config export/import directory.drush si standard install_configure_form.enable_update_status_emails=NULL
. Disable email notification during install and later. If your server has no mail transfer agent, this gets rid of an error during install.drush si core/recipes/standard
. Install from the core Standard recipe.
Arguments¶
- [recipeOrProfile].... An install profile name, or a path to a directory containing a recipe. Relative paths are searched relative to both the Drupal root and the cwd. Defaults to standard unless an install profile is marked as a distribution. Use minimal for a bare minimum installation. Additional info for the install profile may also be provided with additional arguments. Use the format [form name].[parameter name]
Options¶
- --db-url=DB-URL. A Drupal 10 style database URL. Required for initial install, not re-install. If omitted and required, Drush prompts for this item.
- --db-prefix=DB-PREFIX. An optional table prefix to use for initial install.
- --db-su=DB-SU. Account to use when creating a new database. Must have Grant permission (mysql only). Optional.
- --db-su-pw=DB-SU-PW. Password for the db-su account. Optional.
- --account-name[=ACCOUNT-NAME]. uid1 name. [default: admin]
- --account-mail[=ACCOUNT-MAIL]. uid1 email. [default: admin@example.com]
- --site-mail[=SITE-MAIL]. From: for system mailings. [default: admin@example.com]
- --account-pass=ACCOUNT-PASS. uid1 pass. Defaults to a randomly generated password. If desired, set a fixed password in drush.yml.
- --locale[=LOCALE]. A short language code. Sets the default site language. Language files must already be present. [default: en]
- --site-name[=SITE-NAME]. Site name [default: Drush Site-Install]
- --site-pass=SITE-PASS.
- --sites-subdir=SITES-SUBDIR. Name of directory under sites which should be created.
- --config-dir=CONFIG-DIR.
- --existing-config. Configuration from sync directory should be imported during installation.
Global Options¶
- -v|vv|vvv, --verbose. Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
- -y, --yes. Auto-accept the default for all user prompts. Equivalent to --no-interaction.
- -l, --uri=URI. A base URL for building links and selecting a multi-site. Defaults to https://default.
- To see all global options, run
drush topic
and pick the first choice.
Aliases¶
- si
- sin
- site-install
Legend
- An argument or option with square brackets is optional.
- Any default value is listed at end of arg/option description.
- An ellipsis indicates that an argument accepts multiple values separated by a space.