• Keeping WordPress up to date using the standard method of deleting old files, extracting the new ones and then running the database upgrade script is a bit cumbersome, but really not that difficult. Gallery2 uses more or less the same methodology, but it does not require you to delete your files prior to the upgrade because it generates a script to remove deprecated files after the install is complete. This is very kind of them, but the Gallery package is large, and upgrades can get a bit unwieldy. While there are certainly more difficult software packages to maintain, there are things I would much rather be doing than software updates, so I decided to make my life easier by using subversion to manage both applications.

    Subversion is a code revision management tool that is everything CVS should have been. It is not only amazingly useful for software developers, but it can be readily used by end users as a convenient method of keeping their software up to date. It is for this reason that the Automattic and and Gallery folks have started recommending it for those who have command line access to subversion enabled servers.

    There is no way to force the software to make an existing install into a subversion checkout, so to convert my site, I pretty much just followed the instructions at wordpress.org site.

    Create a directory for the new install and “cd” into it:
    $ mkdir wordpress-svn

    Checkout the current WordPress version:
    $ svn co http://svn.automattic.com/wordpress/tags/2.3.1 .

    Copy the things I cared about into from the old directory into the new one:
    $ cp ../wordpress/wp-config.php .
    And the same for:
    favicon.ico
    .htaccess

    The only thing I didn’t really like was their method for copying the files from the old wp-content directory to the new one.

    They suggested using “cp -rpf”:
    $ cd wordpress
    $ cp -rpf wp-content/* ../wordpress-svn/wp-content

    But I prefer to use a “tar | tar” operation as root from my original wp-content directory.
    $ cd wordpress/wp-content
    $ tar cpEf - * | (cd ../../wordpress-svn/wp-content; tar xf -)

    I don’t really have a reason for this other than it’s the way I have always moved large directories full of files with varying permissions. I just have more confidence in “tar” to maintain permissions than I do “cp”. I seem to remember being bitten by “cp” while moving some Oracle databases at some point.

    That pretty much did it for WordPress… Next I moved onto Gallery2. The process was very similar.

    Create the new gallery2 directory within your wordpress-svn folder and “cd” into it:
    $ mkdir gallery2

    Checkout the latest version of the Gallery2 code:
    svn co https://gallery.svn.sourceforge.net/
    svnroot/gallery/branches/BRANCH_2_2/gallery2 .

    Copy over the config file:
    cp ../../wordpress/gallery2/config.php .

    Finally, copy the g2data directory over using “tar | tar”:
    $ cd ../../wordpress/gallery2/g2data
    $ tar cpEf - * | (cd ../../wordpress-svn/gallery2/g2data; tar xf -)

    That was it… Now all that was left was to rename wordpress to wordpress-presvn and wordpress-svn to wordpress:
    $ mv wordpress wordpress-presvn; mv wordpress-svn wordpress

    Everything worked fine, so I was golden. If it had not been, I could have simply renamed the directories back to their original names.

    What did all this get me? Much much easier upgrades. Upgrading WordPress is now just a matter of switching to the latest tag and running “svn up”:
    $ svn sw http://svn.automattic.com/wordpress/tags/2.3.2
    $ svn up

    With Gallery, however, there is no need to do a switch for dot releases, so until it goes from 2.2.x to 2.3.x there is no need to run the “svn switch”… I can just “svn up”.

    Remember that this is a 10,000 foot view of the process. Please read the links to the Automattic and Gallery documentation if you are going to make the move yourself.

    This entry was posted on Friday, November 30th, 2007 at 6:52 pm and is filed under Data and Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 2 Comments

    Take a look at some of the responses we've had to this article.

    1. Dec 10th
      Reply

      Dude. Thanks for the instructions! I’m all svn’d up now! w00t w00t!

    2. с праздником 23 февраля!!!

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: t (74) - wordpress gallery2 (22) - subversion (18) - gallery2 favicon (17) - gallery2 wordpress (13) - favicon gallery2 (13) - gallery2 ldap (12) - wordpress (11) - gallery2 favicon.ico (7) - gallery2 active directory (7) - gallery2 svn (5) - add favicon to gallery2 (5) - wordpress subversion (5) - wordpress gallery2 themes (4) - tar cpEf (4) - wordpress and gallery2 (4) - subversion favicon (4) - gallery2 active directory authentication (3) - tar without svn directory (3) - gallery2 ldap howto (3) - gallery2 https (3) - gallery2 subversion (3) - installing gallery2 in wordpress (3) - gallery2 wordpress example (3) - favicon subversion (3) - how to install Gallery 2 in wordpress (3) - wordpress gallery2 sample (3) - favicon.ico gallery2 (3) - subversion wordpress (3) - how to add gallery2 album to wordpress (3) - how to install Gallery2 on wordpress (3) - convert gallery2 to svn (3) - gallery 2 favicon (3) - WPG2 ldap (2) - cp maintain permissions (2) - subversion manage (2) - tar without svn (2) - wordpress gallery2 comments (2) - managing content with Wordpress (2) - gallery 2 wordpress (2) - gallery2 AD authentication (2) - wordpress gallery2 upgrade (2) - wordpress gallery2 theme (2) - how to install wordpress gallery2 (2) - gallery2 favicon ico (2) - favicon in gallery2 (2) - cp maintain original permissions (2) - favicon how to install in wordpress (2) - gallery2 favicon howto (2) - favicon.ico subversion (2) - gallery2 examples (2) - wordpress gallery 2 howto (2) - gallery2 LDAP Settings (2) - wordpress gallery2 how to install (2) - gallery2 uninstall (2) - gallery2 subversion installation (2) - wordpress svn wp-content (2) - how to add gallery 2 to wordpress (2) - wordpress with gallery 2 (2) - gallery2 delete directory install (2) - http://www google com/ig?hl=en (2) - gallery2 wordpress htaccess (2) - gallery2 svn upgrade (2) - Managing wordpress (2) - wordpress manage in svn (2) - gallery2 svn co (2) - manage a website with subversion (1) - svn wordpress (1) - gallery2 example (1) - wordpress gallery2 examples (1) - ldap svn permission folder (1) - wp gallery ldap (1) - svn centos winbind (1) - gallery2.3 (1) - show gallery2 item in wordpress (1) - gallery2.3 wpg2 (1) - favicon wordpress htaccess (1) - website in subversion (1) - gallery 2.3 Storage Directory Permissions (1) - wordpress gallery howto (1) - g2data and gallery2 and install and 2.3 (1) - howto gallery2 subversion (1) - gallery 2 and wordpress (1) - installing gallery2 for wordpress (1) - gallery2 software package centos (1) - wordpress manage post gallery (1) - favicon not showing after upgrading in wordpress (1) - use gallery2 with wordpress where do i install gallery2 (1) - favicon WordPress 2.3.2 (1) - svn gallery2 (1) - managing a wordpress installation in svn (1) - gallery 2 ldap (1) - gallery2 how to install directory (1) - uninstall gallery 2 wordpress (1) - wordpress and gallery 2 theme (1) - svn up for one directory (1) - update wordpress subversion (1) - gallery2 word press (1) - svn ldap permissions (1) - manage gallery folder wordpres (1) - gallery2 wordpress style (1) - wordpress svn theme (1) - wordpress /svn directory (1) - how to run gallery wordpress (1) - authenticate svn over smb ldap on centos (1) - maintain website in subversion (1) - favicon gallery2 php (1) - wordpress and gallery2 themes (1) - install gallery2 in wordpress (1) - wordpress gallery2 connections (1) - wordpress gallery2 info (1) - gallery2 httpd auth (1) - wordpress Gallery2 2.2 (1) - WordPress gallery2.1 (1) - gallery2 create albums from directories (1) - gallery in wordpress (1) - gallery2 Create Config File (1) - favicon not shown gallery2 (1) - installing gallery on centos (1) - wordpress subversion permission (1) - gallery2 manage site (1) - subversion ldap permissions (1) - default permissions in Gallery2 (1) - gallery centos HOWTO (1) - how to instal Gallery2 in wordpress (1) - reinstall gallery2 but maintain everything there now (1) - how to create gallery2 rss feed (1) - subversion permission ldap (1) - gallery2 gravatar (1) - uninstall gallery 2, wordpress (1) - gallery 2 in wordpress example (1) - gallery2 album copy (1) - gallery2.2 g2data (1) - gallery2 theme checkout (1) - how to install gallery with wordpress (1) - mac os x cp remove .svn (1) - how to create a wordpress gallery (1) - gallery2 permissions (1) - setting gallery2 up on an os x server (1) - how to install gallery in the wordpress (1) - gallery2.3 and LDAP authentication (1) - file gallery 2 wordpress (1) - php svn up (1) - howto install a newer version of gallery2.3 (1) - gallery2 svn checkouts (1) - centos 5 gallery2 (1) - svn folder privileges (1) - gallery2 active directory integration (1) - gallery2 themes (1) - configure iptables gallery2 (1) -