Drush Usage with Multisite

spflanze - November 9, 2009 - 05:06
Project:Drush
Version:All-Versions-2.1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have a multisite installation which means the settings.php file is not in ./sites/default/settings.php. It is instead in a directory such as: ./sites/mysite1.com/settings.php.

I am running Drush under Windows XP. It was installed with the aid of the instructions at:
http://drupal.org/node/594744. In the code pasted below the real URL of my site has been substituted for the example URI mysite1.com.

This is my drush.bat file:

REM See http://drupal.org/node/506448 for more information.
F:\Websites\Servers\php-5.2.10-Win32\php.exe F:\Websites\Servers\drush\drush.php %1 %2 %3 %4 %5 %6 %7 %8 %9

This is the batch file I use to invoke it:
cd F:\Websites\Servers\drush\
drush.bat -r F:\Websites\Mirrors\Drupal6\ -l http://mysite1.com update
ECHO Ending update. Please press enter to continue.
PAUSE>NUL
cd F:\Websites\Servers

This is the first error in the result I get:
F:\Websites\Servers\drush>F:\Websites\Servers\php-5.2.10-Win32\php.exe F:\Websit
es\Servers\drush\drush.php -r F:\Websites\Mirrors\Drupal6\ -l http://mysite1.com update
Could not find a Drupal settings.php file at                             [error]

./sites/default/settings.php.

Does this mean to do an update I will have to copy the settings.php file from ./sites/mysite1/ to ./sites/default/ to get Drush to run on it, and do the same for all the other sites (mysite2.com, mysite3.com, ... etc) in this Multisite installation?

#1

mojzis - November 10, 2009 - 02:18

try running drush from the sites/mysite1.com. at least on linux this works fine without having to specify the -r and -l options - the proper multisite is selected automatically.

#2

spflanze - November 10, 2009 - 15:19

This did not work for me in Windows XP. I put the drush directory in ./sites/mysite1.com and ran if from there. I got the same error.

 
 

Drupal is a registered trademark of Dries Buytaert.