10th Mar 2008

WordPress updates, Subversion, & loving LISHost

I spent the weekend having fun updating my install of WordPress. No, seriously, it was fun. I know it shouldn’t be: all that backing up, downloading, installing, tweaking should’ve driven me nuts. But thanks to the intrepid Blake over at LISHost (where my blog is hosted, because they love librarians and libraries, and they love going on these little adventures with me when I ask for stuff), and a little thing called Subversion, updating can now actually be fun. Dare I say, easy, even.

It’s especially important now, when WordPress is encouraging to do a little sprucing up and getting ready for WordPress 2.5.

Explaining Subversion in small, non-technical words is kinda… complicated. I think that SourceForge explains it best in a nutshell, albeit still a bit technical:

SVN (Subversion) is a tool used by many software developers to manage changes within their source code tree.

It’s pretty much a version control system. If you’ve every used pbwiki, then you know that if you try to edit a wiki page, and someone else has already started editing it, the system will tell you, “sorry, someone’s using this, try back in a few.” Imagine that, but for hundreds of thousands of lines of code for an application, and a bunch of people who all have access to those lines of code. There’s the added plus of an archive of previous versions, also somewhat like a wiki.

Mini tech lesson aside, there is a way to use Subversion to update your WordPress install, the plugins, and even your theme, via the command line. This, also, is somewhat technical, if you’ve never telneted to your web space to futz with your site or your WordPress install. I don’t know how long it’s been around. I only know that, when I heard about it through Casey Bisson last month, I ran to Blake at LISHost and asked if it was possible, and he said yes. I swear I <3 LISHost with a mad passion. Blake and his crew are the awesome.

What is required:

  • Your web host needs to be hip to Subversion. There’s stuff on the server side that needs to be done, and if you ask your web host if they’re willing and know how, they will either tell you yes or no.
  • You need telnet access to your web space. All of the work is done via command line. There are SVN terminals out there, but I was able to do everything through SSH Telnet no problem. The fancier stuff is more for developers, I think.
  • Basic knowledge of Unix commands, so that you can get around your web space on the server.
  • Basic knowledge of commands for whatever flavor of text editor is on the Unix server (the files that required this opened in something called Vim, which will be cumbersome for the uninitiated).
  • Patience, time, and a sense of adventure.
  • Optional but bonus: A pal who knows more tech than you, should you need the help (it especially enhances the learning experience without marring it with unhappy memories of what you broke and couldn’t fix).

Of note:

  • This works best if you’re starting with WordPress, a plugin, or a theme from scratch. Why? When you have something already installed, it’s missing all sorts of invisible parts integral to Subversion: hidden folders, files, and the like. Subversion can’t just add these things to existing installs, it’s done in the creation process somehow.
  • That said, it can be done with existing installs of WordPress (like mine). It’s labor and time intensive, and requires setting your current install of WordPress aside in a different directory, using Subversion to install WP from scratch, then importing all of your changes. If you can have your web host do this for you, then you really should, no matter how technical you are. I owe Blake at least 3 beers for this part *alone*.
  • Not everything can be installed or updated via Subversion. There needs to be a Subversion directory/repository out there containing the stuff you’re looking for. These are some major repositories, but none of these repositories is 100% complete for all things WordPress. Individual plugin/theme developers sometimes have their own Subversion (a.k.a. svn or SVN) repositories of apps they develop.

Now that my base install of WP is SVNified, updating WP to current version updates or an entirely new version is way, way simpler. For updates to a current version, I can telnet to my web space, make a quick backup of my files, and in the directory where WP is installed, type at the command line prompt:

>> svn update

or, if I’m jumping up to a new version, I would type (assuming that the version is 2.4, in this example):

>> svn sw http://svn.automattic.com/wordpress/tags/2.4/

hit enter, and I’m done. That’s it. No pain, no suffering, no beating of the breasts in utter lamentations, complete with mournful ululations.

Plugins were a little more complicated, but once the system is set up, it’s super easy. In the wp-content/plugins directory are hidden svn files and folders (the kind that don’t show up if you issue an ls or ls -l command to show you the directory). One of those files is a properties file called svn:externals. This handy little text file holds the name of the directory in your plugins folder where the plugin lives, and the URL to the Subversion directory out in the world where the updates live. Knowing which folder to look in is a key bit here. The answer is always in the trunk, the folder within that application’s svn directory where the most current version of the code lives.

Once you’ve got the directory names and URLs in the svn:externals file, save it, run the same svn update command in that directory, and ta da! It was like Christmas, I tell you. Adding new plugins is just as easy. Just add a new line to the svn:externals file, and udpate. You can then go into WP and activate as usual.

Remember, this kind of updating only really works when you install the plugin fresh. So, if you already have plugins installed, you’ll need to deactivate them in WP and delete the folders, then install them using this method. I tried it without deleting first, and it just didn’t work. If you have a working hack for this, *please* comment, I want to know about it! I did all the work to reinstall 7 plugins, and it was well worth it. The utterly fabulous and complete instructions I used to set up plugin updates are available at Scott Yang’s Playground. Scott, you are a rock star, and I wish huge truckloads of karma upon you.

You can essentially set up your theme updates the same way as your plugin updates. Just edit the svn:externals file in the themes folder. If you made any crazy customized changes to the old templates, you may need to do it in the new templates. I haven’t tried this part yet.

Here’s the list of plugins I’ve got running on my WP install now. The new ones are bolded.

Updated by hand:

Updated by Subversion:

Making the updates easier will free up tons of time for all that other stuff I’ve been meaning to get to around here.

I know that these instructions aren’t all that detailed, but it’s a start if you feel like playing around with it. Feel free to post questions/comments/ideas, and we can talk about it more.

Posted in Uncategorized | 1 Comment »

22nd Sep 2007

WordPress upgrade party

I don’t know how many of my readers have blogs, and how many of those blogs are driven by WordPress that is installed on a server, as opposed to blogs hosted by WordPress.com.  But, if you have WordPress, you know that shiny new version 2.3 is being released in a few days, which means upgrading your install.  According to the WP folks, the new version has spiffy new features that are worth upgrading to right away.  They also recommended a bit of good karma by making a list of your friends who aren’t as technically inclined and helping them upgrade, or perhaps even throwing an upgrade party.

I like that idea. So, it got me thinking.

How many of you out there, regardless of geographic location, have WordPress, and want/need help upgrading?  Perhaps you’re all good with upgrading, but you don’t want to face it alone? I’m thinking that maybe I can set up a group chat, and/or a Skype hotline, to help people upgrade their installs.

How many of you are in Massachusetts in the Boston Metro area, and would want to meet up in person?  We could find a place with free wifi and snacks, meet up, and still have Meebo/Skype/whathaveyou open to help.

Interested in the concept in some form or fashion?  Leave me a comment and let me know.  I’m thinking either Thursday September 27 or Friday September 28 in the evening.

Posted in Uncategorized | 2 Comments »

11th Sep 2007

No feed switching required!

Blake Carver, mastermind of my web host LISHost, is my hero. Blake has worked his crontab mojo so that my new WordPress feeds will be duplicated to my old RSS feed URLs, so that people who are still subscribed on the old feeds don’t need to switch. Y’all just keep doin’ what you do, and my knowledge will continue to be layed happily and easily upon your news readers. Granted, the old feeds will only be updated once and hour(ish), but I s’pose it’s a small price for not switching. Besides, who just sits around and waits for updates on news readers anymore, right?

He even had the presence of mind to *check my stats* as the basis of his decision for which feeds to keep alive. Brilliant. However, this will explain the huge kachunk of stuff you’ll get from my feed all of a sudden. That, and I’m just posting more - fancy that!

While his ingenuity comes out of his lack of desire to switch his own feeds, it is still a valiant and wonderful thing he has done. All hail Blake.

No, for serious, hail him, for he is The Awesome.

;)

Posted in Uncategorized | No Comments »

10th Sep 2007

Let me introduce you to my blog redesign

I took the plunge this weekend and managed to bang it all out. Blake Carver at LISHost is my hero, installing WordPress and importing my posts, which was totally half the battle for me (at least, timewise). Just goes to show you can’t beat the service at LISHost. Thanks, Blake!

So, quick overview of the new and of note:

  • It’s WordPress, not Movable Type. Yippee!
  • My feed URL has changed. Grab the new feed for your newsreader, so’s you get the new stuff.
  • Comments! Yes, you can finally leave comments on my posts. They’re not broken anymore. :)
  • The layout a bit nicer now. I didn’t mean to pick as pretty a theme as I have, I was just looking for something usable, and this happened to be usable *and* my flavor of zen. I made a few minor changes to the theme, Cherry Blossom 1.0, including spacing and color nudges here and there, and making it widget-friendly in under 10 minutes.
  • Everything is way more printer-friendly, even if you don’t use the new print links, which will actually render you a printer-friendly, text-only version.
  • Recent Flickr photos in the sidebar, if you happen to be in the neighborhood and not feed reading.
  • A Lijit widget to tell you how to find me elsewhere online, with a sort of Russian Roulette feature to explore my content online.
  • Consistent sidebar navigation on every single page. w00t for that, finally.
  • Usable, usable, usable, for readers and for me. No more sacrifices.

Much of the new functionality is hidden in the plugins I chose. Here’s what I’ve got under the hood, and why it’s cool:

  • Akismet 2.0.2, Bad Behavior 2.0.10, Spam Karma 2 2.3 rc4: My bad boy trio of digital bouncers, protecting me against spam. I’m on the beta test list for a new spam plugin in development called Defensio, but I haven’t heard from them about a beta download yet.
  • Better Feed 1.1: I’m still playing with the configuration on this, but the plugin lets you customize your feed, adding social bookmarking links and other features that allow readers to do stuff with your posts in the feed reader without going back to the original post.
  • Contact Form 7 1.4: I’m really excited about this plugin, which is now powering my Send Me Email form. Not only is a pretty AJAX form, so it processes everything without refreshing the page, but it also runs all the email from the form through Akismet to filter for spam. I need to install this one over on the PLA Blog, too.
  • creative commons license widget 0.5: Nice little widget adds the new and improved 3.0 version of the Creative Commons license to my home page.
  • Event Calendar (+widget) 3.1.0
  • Flickr Photo Gallery 0.92: This plugin will retrieve your Flickr photos and allow you to easily add your photos to your posts, without having to leave WordPress. The photos appear in a tab under the content box on the post page, and it’s as easy as clicking on the icon, clicking on a size, and typing away. Many thanks to Snowy in Second Life for the tip that Thursday morning at Coffee @ Crayon.
  • Share This 1.4: Awesome little AJAX plugin for social bookmarking and emailing posts without cluttering up the page with more little icons. Just click on the Share This link on each post or page, and a tabbed box gives you social bookmarking and emailing options for the content. Sexy.
  • WP-Polls (+widget) 2.20: Because someday, I may want to ask people stuff in a poll, and this plugin makes pretty AJAX polls that don’t require refreshing the page.
  • WP-Print 2.11: Hurray printer friendly posts! Clicking on the Print This link on posts and pages will give you just text with related metadata.

I’d still like to add a CV page of speaking/publishing engagements, and a page for handouts/lesson plans for classes at the library. But overall, I’m quite pleased with the results of the overhaul. Now I just hope that everyone’s feeds get changed over. Heck, I hope that people realize that I’m posting here. I’ll be posting more often going forward. ;)

Posted in Uncategorized | 5 Comments »

Bad Behavior has blocked 578 access attempts in the last 7 days.