Installing Drupal with Drush

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:05
    with Emma Jane Westby
  • 0:08
    This lesson is a quick refresher for people who want
  • 0:12
    to be able to use Drush to install Drupal.
  • 0:15
    In this lesson, we'll log into the Vagrant instance,
  • 0:19
    download Drupal using Drush, install Drupal using Drush, and finally,
  • 0:24
    confirm this site is running in a web browser.
  • 0:29
    At this point, our server is ready to go, but Drupal isn't installed.
  • 0:33
    So if we try and pull up the server in a web browser,
  • 0:36
    it's not going to work.
  • 0:42
    See?
Loading ...

Installing Drupal with Drush

Loading...

In previous lessons you learned how to automate the setup of your Vagrant instance. We did not, however, automate the installation of Drupal. This is by design. It gives us the ability to quick create new virtual machines using standard pieces of a LAMP stack before finally installing the specific version of Drupal we want to use. In this lesson you will learn how to install Drupal from the command line using Drush. If you already know how to do this, you should review the Lesson Summary, but you are not required to watch the video as it will be entirely review for you.

Lesson Outcomes

By the end of this lesson you will be able to install Drupal via Drush from within your Vagrant instance.

Lesson Summary

The machine was configured in the previous lesson, but does not have Drupal installed. This is on purpose. You probably have a specific Drupal project you're working on. If you don't, you can use the following instructions to set up a generic instance of Drupal. Note: The Chef recipe we're using supports Drupal 6 and Drupal 7, but not Drupal 8. You'll need to update Drush first if you want to use these instructions to install Drupal 8.

  • $ vagrant ssh
  • $ cd /var/www/docroot
  • $ drush dl drupal
  • $ cd drupal-XXX (where XXX is the version number for Drupal you've just downloaded)
  • $ drush si standard --db-url=mysql://root:[email protected]/drupal7 --db-su=root --db-su-pw=root --site-name="Drupal on Vagrant"
    (for the lessons, the MySQL database has the username root; and the password root, if you have deviated from these insecure passwords, you will need to update this line to get the site install to work).

Gotchas

This lesson assumes you want to install Drupal 7 using the Chef recipe which was given in the previous lesson. This lesson will not work if you are trying to install Drupal 8 as Drush 6 is not compatible with Drupal 8.

Downloads: 
Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.