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.
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 http://svn.automattic.com/wordpress/tags/2.1.3 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 http://svn.automattic.com/wordpress/tags/2.2.1 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 http://svn.automattic.com/wordpress/tags/
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.)