WordPress mass update script 3.4.1

This script will search /var/www (changeable in a variable) for any wordpress installs and make sure its upgraded to the latest version.
It will run a backup to /root/wp_upgrade/ of all files and database before doing anything with the site in case of major catastrophe (make sure you have spare disk space if your sites have a lot of uploaded files).

It pays to check each site after the upgrade to make sure plugins all worked (and upgrade plugins before the upgrade works also!)

If you find any bugs or problems, just let me know at liz at rimuhosting dot com. I have now renamed the script to wordpress-upgrade.sh for easy future memorability (using symlinks to link to the latest version)

8 Responses to WordPress mass update script 3.4.1

You need to be logged into your Linux server as root. If you do not understand what that is then chances are you probably do not want to be using this script If you are a rimuhosting customer just email us, and we can help out.

Hello,
many many many thanks for this script! But it dont work for me because of the MySQL Check, could you disable it?

I always get something like this:
[code]
mysqladmin: connect to server at 'mysql.worldofglider.de' failed
error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 111'
Something went wrong, aborting this uppgrade. Please do this site manually
[/code]

I even tried to manually put in the right password, username and host, but it still dont work.

Couldnt you just visit the blog after each update and "click" upgrade? I think this would work on much more systems.

Heya, the Database connection used to do a dump of the database as a backup in case things go wrong. Feel free to edit the script and comment that out the backup part if you need it, however it may be failing because your wordpress config is non-standard layout or its unable to connect to the database using the correct database details for some reason.
I can see in this case the database host mysql.worldofglider.de is not accepting connections and appears to be broken somehow, you may want to look into that. Alternatively manually dump the database and comment out that part of the script.
The main part of the script just unzips the new wordpress over top of the old one, then checks the database is up to date, i have never yet had it break on me yet or needed the mysql backups

Heya, unsure what the first part of your message means in regards to connections from known hosts and security, can you elaborate?

If you want to copy over without backup then you can just put a # before the backup in the script.
I may rewrite it with more options to enable or disable things in future, this is well overdue for a rewrite from scratch