Subversion is a popular open-source system used by software developers, including the developers of WordPress, for version-control. Unfortunately, understanding Subversion requires delving into the arcane world of terminal commands. But it’s worth the trouble if you’re developing a web site or WordPress theme, or even just working on a document, that may need to undergo numerous iterations. Think of Subversion as a kind of persistent undo that’s even better than Time Machine.

If you need to collaborate on projects using Subversion, you’ll have to have access to an online Subversion server. Setting up a Subversion server online is beyond the scope of this article (i.e., beats me). Fortunately, there are several free or inexpensive services that provide easy access to Subversion online. Of these, based on my very quick survey, Beanstalk seems to be the best. You’ll find a quick introduction to using services like Beanstalk in Chris Nagele’s Vitamin post, Subversion for Designers, which also provides a good general introduction.

If you’re flying solo, the easiest way to use Subversion is to set it up locally on your computer. Creating a Subversion server in MAMP or WAMP is unnecessarily complicated, but if you understand a few basics, using Subversion locally is surprisingly easy.

Here’s a quick tutorial on how to set up Subversion locally on your Mac (using Subversion on Windows should be similar).

Getting Started

Using Subversion is very similar to uploading and downloading files from your host using an FTP client (for example, you can use a Subversion client to download—check out—the latest WordPress build; see Using Subversion on the WordPress Codex). Whether you’re working remotely or locally, you’ll need a Subversion server and a Subversion client.

Download and install Subversion.

You can get the latest version of Subversion from CollabNet. The latest version for Mac OSX as I write this is Universal Subversion 1.4.6. Download and run the Subversion installer.

Download and install a Subversion client.

You don’t want to do any more than you have to from Terminal, so you’ll need a Subversion client. Two excellent clients for the Mac are ZigVersion and svnX (both are free for non-commercial use). If you’re a Windows user, try TortoiseSVN.

I prefer ZigVersion, so I’ll use it for this tutorial. After you download it, license ZigVersion, then watch the excellent video, Introduction to ZigVersion.

Create a repository.

Okay, time to fire up Terminal. You’ll need to set up a new project, called a repository, which is where Subversion will maintain all of your files.

Creating a Subversion repository

  1. First, let’s create a folder to hold our Subversion projects. In the Finder, create a new Subversion folder in your Home directory and a subfolder in the Subversion folder for your project repository. For this example, let’s just name the subfolder Test.
  2. Launch Terminal.
  3. You should be in your Home directory. Type ls and hit Return to list the files in your current location. (For a list of other handy Terminal commands, see OS X commands.)
  4. Create a new repository. Type svnadmin create Subversion/Test and hit Return.
  5. You’re done with the Terminal (yea!), so you can close it. Open the /Subversion/Test folder in the Finder and you’ll see a number of new files and folders. DON’T TOUCH THESE FILES! From now on, you’ll use your Subversion client to manage the repository.

Working with Subversion

Now that you have a repository, you can start work on your project.

Connect to Subversion

To connect to your Subversion repository, launch your Subversion client. If you’re using ZigVersion, you’ll see the Connect to a Server window.

ZigVersion Connect to Server window

Enter the path to your repository in the URL for New Server field. For example, to access the Test repository I created above, I would enter: file:///Users/robert/Subversion/Test. You’ll need to replace robert with the name of your Home directory.

Add and edit files

The repository is empty, so lets add some files.

  1. If you’re starting with a theme or template (Sandbox, for example), just drag the theme folder to the ZigVersion window.

    Viewing the repository in ZigVersion

  2. If you want to start with an empty project, click on the root folder, then click on the Check Out button and create a working folder in the Finder. You can now add files to this folder.
  3. After checking out the project files, you can double-click them in the ZigVersion window (or in the Finder) to edit them.
  4. If you see a ? in the Status column in the ZigVersion window after editing a file, highlight it, control-click and select Add from the popup menu. Once the file has been added, you’ll see an M in the status column the next time you edit it, which means the file has been modified.

Check in and review your progress

After editing your files, click the Check In button in the toolbar to update the changes. You can review the changes and add a comment in the Review and Check In window. It’s a good idea to add comments so you can remember what you were working on. You can check revisions at any time by clicking on the Revision Viewer button.

Learn More

If you’re using ZigVersion, you’ll learn everything else you need to know in the Introduction to ZigVersion video and the
Getting Started With ZigVersion manual.

If the ZigVersion manual isn’t enough, take a look at Version Control with Subversion, the book on Subversion and, trust me, more than you want to know. The entire book is available for free online and you can also download a PDF version.

Published by Charlie Livingston

I'm Charlie, I'm originally from the UK and my idea with ThemeMeme is to create a directory of only the best free WordPress themes to help people find the right theme for them quicker (and to help authors of quality themes get more exposure).


  1. Hi – I have tried following these instructions and got into a terrible tangle… First – zig would not connect to my filepath – I was attempting to install locally – but said ‘Expecting FS format 2 found FS format 3’… then as I investigated further, in terminal I began receiving svnadmin command not found svn command not found. And although the package installer claims that subversion has ben successfully installed, I can’t find it anywhere. (I’m not sure that I am confident enough with Terminal commands to know how to find svn resources through it..) Anyway – after four hours of failing to set up subversion, i am at my wits end. can you help at all?

  2. In response to the comment, I’m on a similar path to you. However I suspect you’ve done what I did and not specified the usr/local/bin or whatever in your path (Please note I don’t fully understand any of that but I believe it to be true)-
    Anyway, have no fear – there’s a guide found here;
    or try TinkerTool which has an option to view hidden files in Finder.

    Regarding this installation – mine is telling me this;

    svnadmin: Repository creation failed
    svnadmin: Could not create top-level directory
    svnadmin: Can’t create directory ‘Subversion/Test’: No such file or directory

    Anyone any ideas?

  3. Sorry I got it wrong- sorted now!

  4. I got it worked perfectly!!! thanks for the guide….

  5. Hello, there is a add-on package for MAMP which permit you to get Subversion server on MAMP in few clicks. It’s shipped with Trac, a subversion source browser,wiki,bug tracker, and Mod_python and python for Python programmers.

  6. So many blog posts out there about installing svn!! But I need a rundown of the terminal commands for connecting to and interacting with a remote svn repository, sans GUI – why is this so hard to find?

  7. I like the valuable information you provide in your articles. I will bookmark your weblog and check again here regularly. I am quite certain I will learn a lot of new stuff right here! Good luck for the next!


Leave a Reply

Your email address will not be published. Required fields are marked *