svn

How is WordPress Subversion Organized


There’s some confusion about how WordPress organizes it’s Subversion (SVN) repository. Most SVN repositories are organized into three main directories, as is best practice — trunk, tags, branches.

The repository can be found at http://core.svn.wordpress.org/ and a primer on how to use SVN for WordPress development can be found on Mark’s blog and, for Windows, on Westi’s blog.

Though there are varying schools of thought as to how branches and tags work, WordPress follows the following system:

/trunk is where future release development occurs. Right now, WordPress development is focused on an upcoming 3.3 release. All development for this release is going into /trunk.

/branches is where 3.3 will go once it is released (or where future “branches” of the software will be housed down the road. The directory contains a series of directories that are branches from the current release development — for example, /branches/3.0, /branches/3.1, /branches/3.2, etc. What you won’t find in branches are security (or dot) releases.

For instance, when a security vulnerability is discovered, it will be patched in /trunk for the current development branch and may be backported to the previous release branch (currently, 3.2). But until the next security release of WordPress comes out for that branch, it is still considered “development” and not “stable”.

/tags is where stable releases are archived. No development goes into tagged releases. These are final releases. You will find every release here in the form of /tags/3.2.1, /tags/3.2, /tags/3.1.4, etc. If you’re looking for the latest current stable for production, this is the place to look.

When branches achieve the next milestone (i.e. a maintenance or security or “dot” release), this is the place where the code is kept.

Hopefully this makes the WordPress repository (and maybe other projects) clear as mud.

Published by

Aaron Brazell

Aaron Brazell is a Baltimore, MD-based WordPress developer, a co-founder at WP Engine, WordPress core contributor and author. He wrote the book WordPress Bible and has been publishing on the web since 2000. You can follow him on Twitter, on his personal blog and view his photography at The Aperture Filter.

2 thoughts on “How is WordPress Subversion Organized”

  1. We use branches for all minor releases, and while these should be considered “development” rather than “stable” the moment they differ from a tag, in practice we’re far more careful. We know a lot of people may be using Subversion to manage their WordPress install, and we generally will recommend doing svn switches from branch to branch, rather than tag to tag, for maintenance reasons. So we do take extra care to ensure that branches are always stable from commit to commit.

    Also, sometimes we will branch prior to release. For example, we’d branch off 3.3, and then trunk would become 3.4 development. When we release 3.3, we’d tag from the branch. We haven’t done this since 2.9, but we’ve discussed doing it again for 3.3 once we hit RC stage, that way we can begin early development again once the code is mostly frozen in preparation for release.

Comments are closed.