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.
- Updating WordPress with Subversion: A howto for the base install, complete with file locations.
- WordPress Plugin Repository
- WordPress Theme & Style Repository
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:
- AJAX Comments (well worth $1)
- Event Calendar & Event Calendar Widget
- Flickr Photo Gallery
- Spam Karma 2
- WP-Print
Updated by Subversion:
- Absolute Comments
- Akismet
- Bad-Behavior
- Betterfeed
- Configurable Tag Cloud Widget
- Contact Form 7
- Creative Commons License Widget
- Maintenance Mode
- Share This
- Subscribe to Comments
- Tag Managing Thing
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.
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.
- Updating WordPress with Subversion: A howto for the base install, complete with file locations.
- WordPress Plugin Repository
- WordPress Theme & Style Repository
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:
- AJAX Comments (well worth $1)
- Event Calendar & Event Calendar Widget
- Flickr Photo Gallery
- Spam Karma 2
- WP-Print
Updated by Subversion:
- Absolute Comments
- Akismet
- Bad-Behavior
- Betterfeed
- Configurable Tag Cloud Widget
- Contact Form 7
- Creative Commons License Widget
- Maintenance Mode
- Share This
- Subscribe to Comments
- Tag Managing Thing
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 »




