Tag Archives: svn

Moving SVN repository

I moved the svn repository from my laptop to the server for easier deployment of http://mybox.grat.in
Here are the commands I used:

on laptop:
svnadmin dump /var/svn/repos/ > home-repository.dmp
gzip home-repository.dmp
scp -P39227 home-repository.dmp.gz mybox.server.xx:/home/myuser

on server:
mkdir -p /var/svn/repos
gunzip home-repository.dmp.gz
cd /var/svn/repos/
svnadmin load /var/svn/repos < /home/myuser/home-repository.dmp

again on laptop:
edited ~/.subversion/config:
sshtunnel = ssh -p 39227

svn switch --relocate file:///var/svn/repos/ svn+sshtunnel://mybox.server.xx/var/svn/repos/

And check it's all good (in the working copy directory):
svn up
svn info

Piece of cake 🙂

Similar Posts:

Tagged , , ,

WordPress + SVN + Auto-update

I’ve been using the latest cutting edge wordpress from svn for a while now and it’s been good. At the time of the writing

You are using WordPress 3.0-alpha.

Basically, even the latest code is safe(ish) and things don’t break easily.

I’m not using it for “production” per se, as the only other person who ever reads this blog is probably me!

So, here’s how I do it:

svn up

If you expected more, there’s really not much there. As everything is pretty simple to setup as per the notes in http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion

Some would only want to update to “stable” version. Others, like me will follow the absolute latest.

Now, how about the permissions for the directory where wordpress is setup. Here’s what I use:

my username: wpuser

apache user: nobody

wordpress installation directory: /home/wpuser/public_html/

cd /home/wpuser/public_html

chown -R wpuser:nobody

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

With the above, it’s easy to upgrade simply by going:

su wpuser

svn up

Now, the automatic upgrade/setup for plugins should work perfectly from within wordpress’ admin interface. If it doesn’t you might want to add the following in wp-config.php:

// Additional variables to allow auto update



define('FS_METHOD', 'direct');

I hope this helps someone out there. Give me a shout if it does 😉

Similar Posts:

Tagged , , , ,