I have been trying to set up drush on my linux desktop (hereafter called client) to control a remote Drupal site running on Windows using XAMPP (herafter called server).

The Drupal root on the remote server is mounted via Samba on the client at this location : /path/to/remote/server1/drupal

I am using the following drush alias:

$aliases['drupalserver1'] = array(
  'root' => '/path/to/remote/server1/drupal',
  #'remote-host' => 'drupalserver1.mydomain',
  #'remote-user' => 'myuser',
  'uri' => 'http://drupalserver1.mydomain',
  'os' => 'Windows',

Now, as I understand it, this tells drush that it is a local installation of Drupal, not a remote one since I left commented the remote-host and remote-user entries.

Drush then reads the settings.php file on the server (via the samba mount on my client), which specifies drupalserver1.mydomain (rather than localhost) and the necessary other configurations.

Database connection is successful as is bootstrapping:

 Site URI                        :  http://drupalserver1.mydomain                                                                         
 Database driver                 :  mysql                                                                                                
 Database hostname               :  drupalserver1.mydomain                                                                                
 Database username               :  root                                                                                                 
 Database name                   :  drupal                                                                                               
 Database                        :  Connected                                                                                            
 Drupal bootstrap                :  Successful                                                                                           
 Drupal user                     :  Anonymous                                                                                              
 Default theme                   :  acquia_marina                                                                                        
 Administration theme            :  seven                                                                                                
 PHP configuration               :  /etc/php5/cli/php.ini /home/myuser/.drush/php.ini                                                    
 Drush version                   :  5.9                                                                                                  
 Drush configuration             :                                                                                                       
 Drush alias files               :  /home/myuser/.drush/examples_example.aliases.drushrc.php /home/myuser/.drush/myorg.aliases.drushrc.php 
 Drupal root                     :  /path/to/remote/server1/drupal                                                                    
 Site path                       :  sites/default                                                                                        
 File directory path             :  sites/default/files                                                                                  
 Temporary file directory path   :  C:\xampp\tmp 

Now, both the Drupal files (/path/to/remote/server1/drupal) and the mysql DB are hosted on a Windows machine, so using 'os' => 'Windows' in the alias makes sense. I even wonder if this line is even taken into account since remote_host is not used.

Is there any hope that the configuration I am proposing works at all ?

Using Drupal 7.


1 Answer 1


In your case, 'os' => 'Linux'. This variable tells Drush how to do things such as filesystem path escaping. As you supposed, this variable is primarily used during remote calls, but I believe it may occasionally be referenced when building commands that are used locally.

I have never tried to set up Drush as you describe above; in theory, it should be possible, as long as you can connect to the database, but you might run into some problems. Post issues in the Drush issue queue if you find bugs. PRs with fixes would be particularly welcome.

  • Thank you Greg. I may give it a shot, though I'll obviously back up my two sites before hand. Is there any risk of corruption when using rsync and sql-sync commands in your opinion ? PR refers to what exactly ? I am not familiar with the acronym. Regards, V.
    – Vincent L
    Commented May 5, 2014 at 14:54
  • PR - Pull Request. Github way to tell "here, I fixed it for you, please include my fix into main project". And rsynca may fail. It happens. Your cat can bite network cable, for example. Or neighbour's kid may cut your line as a joke. Or lightning may... you get the drift ;) There is always that kind risk when you do things over network.
    – Mołot
    Commented May 5, 2014 at 15:29
  • Thanks Mołot, I'm a novice user of stackexchange and github, obviously. Regards
    – Vincent L
    Commented May 5, 2014 at 17:16
  • Follow-up comment. After a few days use of this drush configuration, everything seems to work just fine with 'os' => 'Linux' instead of 'os' => 'Windows'.
    – Vincent L
    Commented May 12, 2014 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.