Last active
August 29, 2015 14:12
-
-
Save msankhala/2f7846643af063aae5c2 to your computer and use it in GitHub Desktop.
Drush site alias template for local drupal site and remote site.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$aliases["loc"] = array ( | |
'root' => '/absolute/path/to/local/mywebsite', | |
'uri' => 'http://default', | |
'path-aliases' => | |
array ( | |
// Change it to your drush installation path. | |
'%drush' => '/Applications/Dev Desktop/drush/vendor/drush/drush', | |
// Website folder relative path. | |
'%site' => 'sites/default/', | |
'%dump-dir' => '/path/to/local/backup/dir/', | |
'%dump' => "/path/to/local/backup/dir/filename.$time.sql.gz", | |
), | |
'databases' => | |
array ( | |
'default' => | |
array ( | |
'default' => | |
array ( | |
'driver' => 'mysql', | |
'database' => 'dbname', | |
'username' => 'dbuser', | |
'password' => '', | |
'host' => '127.0.0.1', | |
// Only specify port if non-standard port. Leave empty for standard port. | |
'port' => 33067, | |
), | |
), | |
), | |
); | |
$aliases["remote"] = array ( | |
'root' => '/absolute/path/to/remote/drupalwebsite', | |
'uri' => 'http://myawesomewebsite.com', | |
// FQDN or IP of server hosting site (think ssh user@remote-host) | |
'remote-host' => 'somehost.a2hosting.com', | |
// A user on the remote host for which you have an ssh key set up | |
'remote-user' => 'iamuser', | |
// Only specify ssh-options if required. | |
'ssh-options' => '-p 7822', | |
'path-aliases' => | |
array ( | |
// Change it to drush installation path on server. | |
'%drush' => '/home/iamuser/pear/drush', | |
'%site' => 'sites/default/', | |
), | |
'databases' => | |
array ( | |
'default' => | |
array ( | |
'default' => | |
array ( | |
'driver' => 'mysql', | |
'database' => 'remote-site-dbname', | |
'username' => 'remote-site-dbuser', | |
'password' => 'remote-site-dbpassword', | |
'host' => 'localhost', | |
// Specify port if neccessory. | |
), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment