Start the Install Process
You can start the install process one of the following ways:
On the web
You can simply go to the install page on the web, and click through the install steps.
But, that takes a while, and it can also all be done in one command on the command line through Drush or Drupal Console. I'll show you how to do it with Console.
With Drupal Console
First, we need to move into the "/web" directory, then we can run
drupal site:install and pass in all of the site info.
drupal site:install standard --site-name "Drupal 8 Site" --db-type mysql --db-port 3306 --db-user root --db-pass root --db-host 127.0.0.1 --db-name drupal8site --langcode en --site-mail email@example.com --account-name admin --account-mail firstname.lastname@example.org --account-pass admin
drush use @d8.loc
The "drush use" command will tell drush that I'd like to run every command, from now on, as though I were in the "@d8.loc" site's web directory. This is important because it means I don't have to move into the "/web" directory every time I want to use Drush. I can run both composer and drush commands from the project root.
(Note: When you're done working on this site simply type
drush use without specifying a site to revert to Drush's default behavior. Otherwise, even if you move into the web directory of another site, all drush commands will still be run as though you were in the web directory of this site. You can still run
drush @d8.stage cr for example to run a single command on another site. The "use" command just changes the default behavior when no site alias is specified.)
The "drush uli" command will open the site in your browser with a one-time login link for the admin user. (This also comes in handy when you import a database dump of a site built by someone else or that you're working on as a part of a team, and you just need to be able to login to work on the site locally, without actually doing anything on production.)
- Click "Login"
- Change the email address, username, and/or password to something you'd like to use.
- email: email@example.com
- username: Awesome Admin
- password: (something strong)
- Click "Save"