I recently came across an excellent bash to mass update WordPress installs, which was written by Liz Quilty. This script works well, but unfortunately it did require manually setting paths if you are not using /var/www for your installs. Due to the large and varying number of servers I needed this for, I decided to make some changes so the script is slightly more automated and eliminate the need for the end user to edit the script.
These changes include:
– Added –path option to allow script to be ran on a specific path only.
e.g wordpress wpupgrade.sh –path /home/user
– Added a function to check for the existence of /var/www and /home, also validates –path option to insure custom path exists.
– Added a function to check the latest WordPress version via wordpress.org api.
– Script is now broke down into into the following functions.
usercheck
path
version
main
help
Here is my modified version.
wget http://dropdeaddick.com/files/wordpress-upgradeDD.sh bash wordpress-upgradeDD.sh |
Here is the original.
wget http://b.ri.mu/files/wordpress-upgrade.sh bash wordpress-upgrade.sh |