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.
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';
}
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:
- Runs "composer install" from the project root
- Syncs a copy of the live database
- Imports the current Git branch's configuration
Examples of the content required for each environment's alias files are provided in the Examples branch of this repo.