-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring local development environment
-
Download drupal 7.36 using
drush dl drupal --drupal-project-rename=drupal7 -
Install it by running the following command inside the
drupal7directorydrush site-install standard --db-url='mysql://[username]:[password]@localhost/[database-name]' --site-name='[site name]' --account-name=[admin-username] --account-pass=[admin-password] -
Use
drush en [module-name]command to install all the required modules -
Alternatively, use drush make with the following make file and then do a drush site-install
;full documentation for drush make file at http://www.drush.org/en/master/make/ core = 7.x api = 2 projects[drupal][version] = 7.36 projects[] = views projects[] = coder
-
Download the specified version of drupal using
drush dl drupal-8.0.0-beta10 --drupal-project-rename=drupal8 -
Install it in a manner similar to drupal 7
-
In the .drush directory in the home folder, put a file named
[sitename].aliases.drushrc.phpwith the following content#Example aliases file at https://github.com/drush-ops/drush/blob/master/examples/example.aliases.drushrc.php <?php $aliases["d8"] = array ( 'root' => '/home/shivanshu/webapps/drupal8', 'uri' => 'http://drupal8.localhost', ); $aliases["d7"] = array ( 'root' => '/home/shivanshu/webapps/drupal7', 'uri' => 'http://drupal7.localhost', ); ?>
-
Now, the drush commands can be run from any directory in the following manner
drush @d7 en [module-name] -
To list all enabled modules, use
drush @d7 pm-list --type=Module --status=enabled
-
drush archive-dumpwill backup the website in an archive -
drush archive-restore [path to archive]will restore the backed up archive in the folder where the command is run