Using Drush To Install Drupal 7 from Scratch

Using Drush you can really simplify the process of installing a brand new Drupal site using a couple of commands in your CLI/Terminal. Follow the instructions below to get started. 1. Firstly, create a Database for your New Drupal Installation and note the login credentials. 2. Open your terminal and change directory 'CD" to your Web Directory and enter the commands below: The Web Directory/Document Root will depend on the OS you are using: Linux/Ubuntu: Linux: var/www/html/ Windows (XAMPP/WAMPP): C:\xampp\htdocs or C:\wamp\htdocs 7.x: here 'x' is the version number. Right now it's 7.35 so i enter drupal-7.35.

 drush dl drupal-7.x 

 Now in your terminal change directory to: cd drupal-7.x and enter the commands below:

 drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://root:1bm04CS093@localhost/test_dronaas 
  • Note: The Drupal username and password seem to always end up as admin/admin no matter what I set them to. So, I suggest just using those and then changing them after you login to your new site.
  • Also if you are using Linux/Ubutnu make sure to assign the apache-user to the directory 'files' located at 'sites/default/files.' You can do that using the command below:
 sudo chown www-data