Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


WP-Mass-Tools v1.3
Scot Hacker (

*** These tools must be run by root - they are not for users of standard hosting accounts. ***

WP-Mass-Tools is a collection of tools (bash shell scripts) for managing lots of disparate WordPress installations on a single server. The system assumes you're working on a cPanel-based server, but it can be easily modified to work on other systems instead. All installations are  checked out via subversion, and their locations listed in a file. When upgrade time comes, a script is run to iterate through all registered sites, back up their databases just in case, and upgrade (svn sw) them to the new version. 


Unzip the package to a directory somewhere safe on the server (such as /root/scripts/wp-mass-tools/*)

Rename to This way you can upgrade this package in the future without overwriting your sites array.

Edit a couple of variables at the top of and, setting the path to where the tools are kept, the path to svn on your server, and the path to the "mail" binary on your server. You'll also be putting the server's root db password in some of these - PROTECT THE WHOLE DIRECTORY WITH CHMOD 700!!!


sh /path/to/scripts/

Simply follow the prompts. When it's done, it will spit out a new line, to be added to the bottom of You must add the line to manually - it's not done automatically. 

IMPORTANT FOR CPANEL ADMINISTRATORS: Because cPanel has changed the database creation API, this script no longer creates databases on cPanel systems. You'll need to create the database manually through cPanel, then run this script with matching credentials. If you can help modify this system to utilize the new cPanel APIs, please contribute code!

If a major WP release has been made and you're worried about plugins breaking, you can use to spit out a list of all active plugins on all sites on the server. You can then compare the list to lists of known incompatible plugins on the internet. 


sh /path/to/scripts/ > plugin_report.txt


To upgrade sites, first edit the file email.txt - the contents of this file will be sent to all users listed in! The script will ask you to confirm that you've edited the file so you don't embarrass yourself by sending out an old one (which has never happened to me, of course ;)

Take a look in and make sure you really do want to upgrade everything listed there. If you want to skip a site, simply comment it out for now. Then:

sh /path/to/scripts/ | tee wpuplog.txt

and follow the prompts. You'll see the output live, but will also have a complete record of the process in wpuplog.txt, which you should page through later to make sure there aren't any unexpected errors (e.g. sometimes customers will move their directories around and you'll need to update the paths in your site array).


1.1 Updated to use array of sites in a separate file

1.2 No longer attempts to create the database on cPanel systems. Changes permissions modification to work on phpsuexec servers. In other words, it no longer changes ownership to user:nobody, but to user:user. Now storing the backed up database in the user's home, not within public_html. Added protection against a situation - a bug - where if the array of sites had a blank line at the end, it would cd to / and start changing permissions!

1.3 Added a new util script that sends email ONLY to all users - wp-mass-email does not modify any files.


Batch upgrade/management for multiple independent WordPress installations on a single server.



No releases published
You can’t perform that action at this time.