Skip to content

Instantly share code, notes, and snippets.

@danreb
Created November 30, 2012 06:23
Show Gist options
  • Select an option

  • Save danreb/4174103 to your computer and use it in GitHub Desktop.

Select an option

Save danreb/4174103 to your computer and use it in GitHub Desktop.
Drush aliases configuration
<?php
/*
*
* @filename: aliases.drushrc.php
* Drop this php file into your home directory .drush folder
* e.g on my Windows 7 PC, directory looks like this
* c:\Users\Userna\.drush
* and on Linux it should be /home/yourusername/.drush
*
*/
// Set alias for our remote website
$aliases['remotesite'] = array (
'root' => '/home/username/public_html',
'uri' => 'http://website.com',
'remote-host' => 'website.com',
'remote-user' => 'username',
'path-aliases' =>
array (
'%drush' => '/usr/local/share/drush',
'%site' => 'sites/default/',
'%dump-dir' => '/home/username/tmp',
),
'databases' =>
array (
'default' =>
array (
'default' =>
array (
'database' => 'databasename',
'username' => 'database_user',
'password' => 'database_password',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
),
'command-specific' => array (
'sql-sync' => array (
'no-cache' => TRUE,
),
),
);
// Set alias for our local website
$aliases['localwebsite'] = array(
// Start edit here
'root' => 'C:/Users/Username/Sites/websitefolder',
'uri' => 'http://dev.localhost',
'path-aliases' => array(
'%dump-dir' => 'C:/Users/Username/Sites/websitefolder/tmp',
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment