Pondering the South African Memesphere – Looking for the Good in Everything header image 2

Maintaining my WordPress blog with Subversion

June 23rd, 2007 · Posted by Who Knows? · No Comments

Being a big subversion (and version control in general) fan, I have no idea why I didn’t use subversion right from the start. As I have made some local modifications, it was always a pain to upgrade to a newer WordPress. Now? No more moving files around, no more applying my patches… more info on this below.

Next up: figuring out the nicest way to include my Google Reader Shared Items (rss) on the side bar. And maybe installing a theme… it seems my tastes have changed since I last nearly made up my mind.

I’m assuming some subversion experience… My primary source of inspiration was Installing/Upgrading WordPress with Subversion, that page does a little more hand-holding than I will do here (or needed myself, of course 😉 ).

I have 2.1.3 installed, and I have a local copy of everything on my site, on my laptop. Let’s check out the 2.1.3 tag, saving in a directory named “blog_svn”:

svn co blog_svn

A diff confirms that this checkout matches my local copy of my site – only my local modifications are seen in the diff. Next, I move all my files into the blog_svn tree, overwriting the “upstream” files. Now I can do an “svn diff” inside this directory to see my local modifications, to verify that it matches the diff I had created previously.

OK, now the upgrade… let’s upgrade to 2.2.1:

svn sw blog_svn

(The last parameter pointing at the checkout directory again.) Now I can svn diff again, find the conflicts if there are any (there are), and just fix them. (I’m still on the default theme, still undecided about what theme I want to use, combine that with a lack of time/urgency… Anyway, the conflict: it seems the default theme can now handle widgets in the sidebar. That could also alleviate some of the schlepp of local modifications.)

As any svn-literate person should know, it is easy to check what versions are available:

svn ls

Now all that is left for me, is upload the new files, and hit the upgrade URL… (possibly first deactivating and later reactivating them. You might want to check out Upgrading WordPress). One bit of bother: uploading is slow. And now I’m uploading the .svn directories too. (I’m lazy, okay? And I’m using ncftp. I wish I could rsync or something.)

Categories: Website

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>