Drupal Console: Install a new site
drupal site:install \ --learning \ --uri="http://testing.site" \ --langcode="en" \ --db-type="mysql" \ --db-host="localhost" \ --db-name="drupal8_site" \ --db-user="somesiteuser" \ --db-pass="really secure password" \ --db-prefix="prefix_" \ --db-port="3306" \ --site-name="Drupal 8" \ --site-mail="admin@example.com" \ --account-name="anything but admin" \ --account-mail="admin@example.com" \ --account-pass="another really secure password" \ minimal # the profile name
The
--uri= option is needed when dealing with multi-site.
The drush version
drush site:install --db-url=mysql://username:password@dbhost/dbname --account-name="anything but admin" --account-mail=anybutadmin@example.com --site-mail=noreply@example.com --site-name="Site Name" --sites-subdir=multist minimal
- --db-url=mysql://username:password@dbhost/dbname
- The sql url needed to connect to the database
- --account-name="anything but admin"
- Admin is the default installed username, so use anything but this!
- --account-mail=anybutadmin@example.com
- Email address of the above admin account
- --site-mail=noreply@example.com
- Email address used by the site to
- --site-name="Site Name"
- The site's title/name.
- --sites-subdir=multisitedir
- The directory inside the sites direct to place the site files.
- minimal (profile)
- The profile to install for the site. This can be one of the core profiles, or an additional one.