Installing Drupal using Drush

Ready for review -- AWAITING PEER REVIEW
This lesson will teach you to download and install Drupal using Drush

It is now time to start with Drush. You would be amazed to see how easy it is to download and install Drupal using Drush.

IMPORTANT: Before we start using Drush, I would like to tell you about the help command.
In drush, 'drush help' command is used to get help about something. So if I want to learn about the download command, I can type 'drush help dl'
To learn more about help command, use 'drush help help'.
So if you are stuck anywhere, use the help command.


1. Before we download Drupal, we have to navigate to the location where you want to download Drupal. Use the 'cd' command to Change Directory.

2. Now we can begin with the download. Type in the following command in command prompt.

drush dl drupal

You can visit Drush website to understand the command.

Using the cd and dl command

3. You can see in the image that Drupal has been downloaded in directory 'D:/xampp/htdocs/drupal-7.24'. Let us use Rename command to rename the directory to something better.

rename drupal-7.24 d7dev

On UNIX systems, you can use

mv drupal-7.24 d7dev

4. Now let us move to the Drupal directory and start the installation. Type:

cd d7dev

We are now using the si(site-install) command to install the site.

drush si standard --db-url=mysql://root:pass@localhost/dbname --account-name="royal121" --account-pass="password" --account-mail=""
Replace root and pass with your Database username and password. Change dbname to your database name. Set your account name, account password and account mail.

Press 'y', if it asks for permission.

Using the si command

5. That's it! We installed our first Drupal site using Drush. We can now go to the site and try logging in.

Drupal site installed

Lesson tags: