Besides being a useful tool for software developers to keep track of their source code versions, Subversion also provides a quick and easy way for users to install/upgrade software such as blogs, wiki’s and forums that are constantly being updated with new features and security patches.
However if, like me, you initially installed WordPress manually by downloading the zip file and extracting the files, you will first need to do a little bit of work to link your software in to the subversion repository.
Assuming your wordpress installation is in a folder called blog, you can get it working with the following steps:
# backup the original blog folder
cp -Rp blog blogBACKUP
# create a new folder
# checkout the latest version of wordpress from their subversion repository
svn co http://svn.automattic.com/wordpress/tags/2.3.1/ blogNEW/
# copy in any custom changes in wp-content and also the wp-config.php file
cp -Rp blog/wp-con* blogNEW/
# copy in the .htaccess file if you have one
cp -Rp blog/.htaccess blogNEW/
# delete the original blog
rm -rf blog
# move the new blog to your blog locatio
mv blogNEW/ blog
# finally run the http://yourdomain/blog/wp-admin/upgrade.php script in your web browser
Once you’re linked into a Subversion repository, future updates can be applied by simply running:
svn switch http://svn.automattic.com/wordpress/tags/2.3.2/
Where the url given is the subversion repository location of the new version you wish to upgrade to.
NB: After every update, you should go to http://yourdomain/blog/wp-admin/upgrade.php in your web browser as their may be some database tables that need upgrading.