site:install¶
Install Drupal along with modules/themes/configuration/profile.
Examples¶
site:install si demo_umami --locale=dasite:install si --db-url=mysql://user:pass@localhost:port/dbname?module=mysql#tableprefixsite:install si --db-url=sqlite://sites/example.com/files/.ht.sqlite?module=sqlite#tableprefixsite:install si --db-url=sqlite://:memory:?module=sqlitesite:install si --account-pass=momsite:install si --existing-configsite:install si standard install_configure_form.enable_update_status_emails=NULLsite:install si core/recipes/standard
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.
- --extra=EXTRA. Add custom options to the SQL connect string (e.g. --extra=--skip-column-names)
- --account-name=ACCOUNT-NAME. uid1 name. [default: admin]
- --account-pass=ACCOUNT-PASS. uid1 pass. Defaults to a randomly generated password. If desired, set a fixed password in drush.yml.
- --account-mail=ACCOUNT-MAIL. uid1 email. [default: admin@example.com]
- --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-mail=SITE-MAIL. From: for system mailings. [default: admin@example.com]
- --sites-subdir=SITES-SUBDIR. Name of directory under sites which should be created.
- --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 core:global-options.
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.