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!)

Let me know if you have any bugs at all, or any problems.

Here’s your script to upgrade them all.

wget http://b.ri.mu/files/wordpress-upgrade.sh
bash wordpress-upgrade.sh

MD5
ca9e37fc0cce7348ba0bea2dee4cdf43 wordpress-upgrade-3.4.1.sh

SHA1
3846d892b8a894af6541c577eac4dd2cc557a25e wordpress-upgrade-3.4.1.sh

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.

  1. 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:

    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
    

    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 :)

  2. Hello,
    it allow only connections from know hosts… this is for security, btw. could you please remove the host and fill it up with XXX, thank you.

    Could you publish an version of your script which just copy over the files? Without backup?

    Thank you!

    • 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