Another WordPress upgrade… and a tiny how-to!

So today finds yet another security release from WordPress. I am thankful that those guys work so tirelessly so that I may bore you with my Linuxy goodness. Since I want to keep the Your Linux Guy .com site as current as possible, I diligently upgraded right away.

But I got to thinking, now that I’m up-to-date, why don’t I use this as an opportunity to teach how *I* do my blog software updates? I mean, the WordPress people put together a beautiful set of docs on how to do it, but after a while, you’re used to the process and just use a down-and-dirty method. And this way, I can use this as a reminder to myself for the next security update, so I don’t have to go searching through my bash history…

😉

So here are the steps I take:

  • Backup the blog! For example:

tar -czvf /tmp/yourlinuxguy.com."`date '+%Y.%m.%d-%H.%M.%S'`".tgz /bla/bla/yourlinuxguy.com (Warning: that is all one command. And, the single and double quotes presented in your browser may not work on the command line, you may have to change them in the actual command)

  • Get the software, put it in a new temp folder. For example:

mkdir /tmp/wp-2.3.3/
cd /tmp/wp-2.3.3/
wget http://wordpress.org/latest.tar.gz

  • Untar/unzip it into the directory. For example:

tar -zxvf *

  • For each blog, cd into the existing blog directory. For example:

cd /bla/bla/yourlinuxguy.com/ww

  • Copy latest files over existing blog files. For example:

cp -au /tmp/wp-2.3.3/wordpress/* .

  • Repeat last two steps for each hosted blog.

And that’s it! Now maybe I’ll remember next time… fat chance… By the way, the cp command flags are “a” for “archive” and “u” for “only update newer files”. You may want to adjust to taste.

But please remember, folks, if you don’t know what you’re doing, go out to WordPress.com and read their masterful documentation. If you use my method and it doesn’t work, feel free to post here, but of course, I make no warranty…. especially if its a custom upgrade, or a major-level one…. Enjoy!

😉

Leave a Comment

Your email address will not be published. Required fields are marked *