Lee Kelleher

Upgrade WordPress Shell Script

Posted on . Estimated read time: under a minute (131 words)

Now that I’ve found my new best friend (the sourcecode short-code), I want to put it to good use now.

Here’s a quick Unix shell script that I use to upgrade my WordPress installations:

#!/bin/sh
# WordPress Update Script
# Written by: Lee Kelleher
# Released: 2008-04-23
# Email: lee # at # vertino # dot # net
# Released under GPL

echo "Downloading current version of WordPress..."
wget http://wordpress.org/latest.tar.gz

echo "Uncompressing WordPress archive..."
tar -zxvf latest.tar.gz

echo "Removing downloaded archive..."
rm -f latest.tar.gz

echo "WordPress Upgrade complete!"

It’s a very very basic script… if you’re looking for something more user-friendly, (with back-ups), then either take a read of the WordPress Codex article, or download a better Unix shell script.

My version suits my purposes nicely.