random($foo)

« Checkvist is my Task List
Cloning Macs via the Command Line »

Making sure WordPress is up-to-date #

spacer

random($foo) is the personal site of Leonard Lin, where I collect shiny things and publish original writing and code. more »

For anyone that has to manage many (any?) WordPress instances, keeping it up to date can be a real PITA. (I don’t expect WP to ever have an SSH vs FTP based auto-update).

The best way to make life a little easier is to move over to using svn tagged versions. Then you can simply switch over the next time a security vulnerability is patched with a simple ‘svn’ switch.

Here’s some simple bash-ness that’ll help you know when to upgrade. In *theory* you could run this on cron and have it auto-update, but I’m assuming that if there’s a DB schema update required, you’ll need to watch over it, so probably not something you want to run on production without some verification:


installed_version=`svn info $yourwp | grep URL | cut -f 2 -d' '`
current_version=`/usr/bin/lynx --dump --nonumbers core.svn.wordpress.org/tags/ | tail -n 2 | head -n 1`

if [ installed_version != current_version ]; then
  # this is where you could get fancy and do an svn switch and update
  echo `date` | mail -s "WP is out of date!" yourmail@example.com
fi

This entry was posted on Saturday, February 19th, 2011 at 4:26 pm and is filed under Tech, Web. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

  • Mark

    lynx is definitely the browser's browser

    anyway, my wp blog is probably pretty humdrum compared to whatever you're doing. but I have noticed that updates can be annoyingly frequent. though it seems to be the de facto platform for people looking for something that has a decent community is free and is user friendly. However, it's always felt sort of cobbled together to me.

  • randomfoo.net/ lhl

    yeah, there's not really a good alternative that's as flexible, actively maintained, and (generally) easy to use as WP. my blog is running pretty stock. a few plugins and my own (super minimalist, as you can see) theme. and I have all my old posts imported from pre-history, which is good times.

Entries (RSS) Comments (RSS) 27 queries. 0.045 seconds. -->
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.