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

8 Comments

  1. Posted February 22, 2007 at 2:02 am | Permalink

    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. Posted February 22, 2007 at 9:20 am | Permalink

    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. Posted February 22, 2007 at 8:31 pm | Permalink

    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. Posted February 22, 2007 at 9:23 pm | Permalink

    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. Posted December 1, 2007 at 10:16 pm | Permalink

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

  6. Posted December 2, 2007 at 3:38 pm | Permalink

    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. Posted December 2, 2007 at 3:59 pm | Permalink

    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. Posted December 2, 2007 at 6:09 pm | Permalink

    Bob: yes, exactly.

Post a Comment

Your email is never shared. Required fields are marked *

*
*