Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

We have a multi-site install that uses the same core files but different databases. As of right now, we have over 40 sites. When I do module and core upgrades, I have to login to each site and manually run update.php.

Is there a way to automate this process so that I do not have to spend so much time logging into every multisite, run update.php and clear the cache? If so, what is the exact command to run update.php? I've tried wget and that doesn't seem to work.

share|improve this question

1 Answer

I've written a similar script on a 50+ site multisite install. You want to use the command line powertool drush for this, and then run the command

drush updb

from a shell script, ex:

cd /var/www/site1-environment/
drush updb --uri=http://site1.com 
cd /var/www/site2-environment/
drush updb --uri=http://site2.com 
... etc

Of course if all of these sites are in the same multi-site structure than you won't need to repeat the cd command in your shell script.

share|improve this answer
Thanks for the information. I am going to see what I can do about getting the Server team to install drush for me. – Julie Jun 15 '12 at 11:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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