2

I'm running multiple sites on a single Drupal 6 installation. I'd like to use drush to update Drupal core to the latest version without having to unlock update.php via settings for each site and then going to update.php for each of the different urls (there are over 10 sites).

Is there a drush command to update drupal core and run update.php for all sites at once?

1 Answer 1

1

There's no one single command to do it but we use a bash script that follows this pattern:

  1. ls sites folder for all directories
  2. pass resulting output to drush -l $variable sql-dump > /home/user/backup/$variable.sql
  3. pass resulting output to drush -l $variable updb --yes

Hope this helps.

2
  • That answers my question, digital, thanks. And thanks for sharing your script. In short then, I really just need to write a script that finds the site directories in the site folder and calls the drush -l {siteurl} updatedb command.
    – Evil E
    Commented Jul 24, 2011 at 18:34
  • Yeah pretty much, it's crude but effective.
    – digital
    Commented Jul 25, 2011 at 12:38

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.