Updating Wordpress via SVN when the repository URL changes

Wordpress has a great and constantly up-to-date wiki for administrators to manage Wordpress installations via SVN. Every time a release is made, I just search google for “wordpress svn sw” and copy the svn sw link over to my terminal.

But recently they changed the repository URL — which means anyone using the old URL will get the following error when they try to update (assuming they are using the svn sw command):

svn: 'http://core.svn.wordpress.org/tags/2.8'
is not the same repository as
'http://svn.automattic.com/wordpress'

The fix for today’s (2.8) release is easy (replace 2.7.1 with whatever you were previously using):

svn switch --relocate http://svn.automattic.com/wordpress/tags/2.7.1 http://core.svn.wordpress.org/tags/2.7.1/ .

Then just do your normal:

svn sw http://core.svn.wordpress.org/tags/2.8/ .

It’s not hard to fix, but I’m not an avid user of SVN. So every time I do an update (assuming the repo URL has changed), I have to look at svn help and remember the syntax for changing repositories. Now, since I wrote this, I won’t need to. Perhaps this helped you too!


About this entry