Simple WordPress Upgrades With SVN

One of the proposed features of the WordPress 2.7 release is quick-upgrading (maybe one-click?). So, until WP 2.7 hits the streets, which probably wont be long since the WP team seems to version-up every month or so now :) I figured I would publish a technique I have been using to rapidly update my code-base. This procedure assumes a few things though…

  • root access to your host.
  • Subversion running on the host webserver.

Ok, so you passed that check-point… time to make life easier :)

Preparing your blog for quick WordPress upgrading:

  1. First, back up everything. Codebase, plugins and DB.
  2. Login to the admin interface and disable your plugins.
  3. Shell in to the root of your WordPress install directory.
  4. Copy “wp-content” up a level.
    $ cp -Rf wp-content ../wp-content
  5. Check the current path.
    $ pwd
  6. Copy that path excluding the current directory. So for example if you see “/usr/web/wordpress” copy this part of the path “/usr/web”.
  7. Remove the “wp-content” directory.
    $ rm -Rf wp-config
  8. Create a backup of your “wp-config.php” file.
    $ cp wp-config.php wp-config.php.bk
  9. Check out the latest WordPress tag from the repository.
    $ svn sw http://svn.automattic.com/wordpress/tags/2.6/ .
  10. Remove the new “wp-config.php” file and replace with your backed-up version.
    $ rm wp-config.php&&mv wp-config.php.bk wp-config.php
  11. Remove the new “wp-content” directory
    $ rm -Rf wp-content
  12. Create a sym-link to the new location of “wp-config”
    $ ln -s [paste the path you copied earlier here]/wp-config wp-config
  13. Fire up your browser and go to : http://www.yourblog.com/wp-admin/upgrade.php
  14. Log back into the admin interface and re-enable your plugins.

All done! Next time WordPress upgrades are available as a tagged release you can just follow these quick steps:

Quick 10 step Upgrade:

  1. Follow the typical WordPress recommended upgrade preparations (backups, disabling plugins, etc.)
  2. Shell in to the root of your WordPress install directory.
  3. Create a backup of your “wp-config.php” file.
    $ cp wp-config.php wp-config.php.bk
  4. Remove the sym-link to “wp-config”
    $ rm wp-config
  5. Check out the latest WordPress tag from the repository.
    $ svn sw http://svn.automattic.com/wordpress/tags/2.6/ .
  6. Remove the new “wp-config.php” file and replace with your backed-up version.
    $ rm wp-config.php&&mv wp-config.php.bk wp-config.php
  7. Remove the new “wp-content” directory
    $ rm -Rf wp-content
  8. Create a sym-link to the new location of “wp-config”
    $ ln -s [paste the path you copied earlier here]/wp-config wp-config
  9. Fire up your browser and go to : http://www.yourblog.com/wp-admin/upgrade.php
  10. Log back into the admin interface and re-enable your plugins.

Enjoy!

Update: Just saw a post concerning this on the WP dashboard :) It’s pretty extensive but I’ll still keep my post here for reference. Go here for more details link

About John Pencola

Hello, my name is John Pencola. I can't get enough of exploring new technologies, discussing software principals, creating programs and having fun with interface design. I will share my experiences here and hope Liquid Language adds some useful information to the vast sea that is the web.
This entry was posted in How-To, Process and tagged , , , . Bookmark the permalink.
  • Andy

    Good style. Adviced to friends

  • http://filmnew.ru Jaroslav

    Thanks for the info!