Skip to content

ModulesUnraveled/Drush-Shell-Aliases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Useful Drush Commands for Drupal 8 Development

To use all of the commands in this file, you must have an alias file on each server named something like "mysite.aliases.drushrc.php". Information on examples is provided below.

Composer

If you use composer to install these, you'll need to add something like the following to your /drush/drushrc.php file

<?php

 /**
 * Load additional drushrc.php files
 */
if (file_exists(__DIR__ . '/contrib/drush-shell-aliases/drushrc.php')) {
  include __DIR__ . '/contrib/drush-shell-aliases/drushrc.php';
}

How to Use These Commands

When setup, you could:

  • Sync the prod database down to the local site by typing:

drush @mysite.loc data-live

  • Or, fully rebuild your local site by typing:

drush @mysite.loc rebuild

Which:

  1. Runs "composer install" from the project root
  2. Syncs a copy of the live database
  3. Imports the current Git branch's configuration

Examples

Examples of the content required for each environment's alias files are provided in the Examples branch of this repo.

About

Useful Drush shell-aliases for Drupal 8 development.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages