itsdarrylnorris / lazydubuntu

(Deprecated) Setting Up my Drupal Enviroment in Ubuntu
http://www.lazydubuntu.com
Apache License 2.0
20 stars 10 forks source link

Virtual Host Support with Drush #21

Open itsdarrylnorris opened 9 years ago

itsdarrylnorris commented 9 years ago

Problem:

In order to setup a Drupal installation, we need to created a new virtual host and then move to a directory and then install download a Drupal core and then setup the database.

Solution:

We need to integrate Drush 7x as flag. For instance

newsite hostname -d7 

This is going to run create a virtual host and configure all the drupal files similar to the following steps.

cd /var/www/hostname #Move to working directory. Remember that newwebsite can change depends on your hostname.
sudo rm index.html # Remove the test website
sudo drush dl drupal-7 # For D8 just change to drush dl drupal-8
cd drupal-7* 
sudo mv * .[^.]* ..
cd ..
sudo rm -rf drupal-7*  # Remove unnecessary folder
sudo cp sites/default/default.settings.php sites/default/settings.php
sudo chmod a+w sites/default/settings.php
sudo chmod a+w sites/default