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.

1 Answer 1


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.

  • 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, 2012 at 11:37

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.