Updating Wordpress with Subversion and sitecopy

I don’t know why but the official Installing/Updating WordPress with Subversion page doesn’t mention an easier (and better?) way to do the same task:

svn co http://svn.automattic.com/wordpress/tags/2.1.1/ wordpress-2.1.1 # substitute 2.1.1 with the version number you need
svn export --force wordpress-2.1.1 wp_blog # wp_blog is a folder with your external and previous Wordpress version's files

Now run sitecopy to synchronize wp_blog with your remote site. That’s it.

Last update: 2008-05-20

If you enjoyed this post, make sure you subscribe to my RSS feed!

8 Responses to “Updating Wordpress with Subversion and sitecopy”


  1. 1 Scot Hacker

    I’m the author of the Codex article on using svn. Your tip here is interesting. Could you possibly flesh it out with a bit more information? What is the -export flag for and how is it operating in this example? What is “sitecopy” and how it being used here?

    Thanks,
    Scot

  2. 2 Carlo

    Ok, let me try to explain it a bit more deeply.
    The main idea is to:
    1 - get a stable version of Wordpress (with svn co…)
    2 - wp_blog is a folder with your external and previous Wordpress version’s files (.htaccess, wp-config.php, plugins etc…)
    3 - use svn export –force to get the new stable version of Wordpress being copied to wp_blog (or to a copy of that folder). svn export without –force won’t export to a not empty folder
    4 - export wp_blog with sitecopy. sitecopy is a wonderful command-line tool to keep in sync a folder with a remote website (see http://www.lyra.org/sitecopy/ it supports many protocols).

  3. 3 Scot Hacker

    Thanks Carlo. Interesting - had never heard of sitecopy. My cPanel server doesn’t have that command, so unfortunately, these instructions would require getting the assistance of a sysadmin to install an uncommon binary for users. Regardless, you might want to flesh it out and add it to the Codex (so others can help refine it), rather than just posting it on your blog.

  4. 4 Carlo

    Ok I would try to save some free time to add these little notes to the Codex… sitecopy is a binary you can use on your local computer, it’s not a server-side program.
    After its initialization, its common usage is
    sitecopy -u label_name_of_your_website
    which makes your website a copy of your local folder (copying only the changed files).

  5. 5 Bob

    Why not do it in one step:
    svn export –force http://svn.automattic.com/wordpress/tags/2.1.1/ wp_blog

  6. 6 Carlo

    Bob: that is exactly what I’ve written. :) But you need sitecopy to copy the local wp_blog to your hosting directory (if wp_blog is not that directory, of course).

  7. 7 Bob

    OK, I think the confusion is that I’m running the ’svn’ command on the same server that hosts my blog, so I can export the files directly to my WordPress directory. Your case is where you need to run svn on some other computer then upload it to server with the blog. Correct?

  8. 8 Carlo

    Bob: yes, exactly.

Leave a Reply