How to Release Your Plugin on Using SVN

One of my favorite things about WordPress and PHP development is the ease of entry they have to offer. Just install the LAMP stack on your machine, open a text editor and you are on your way to developing awesome WordPress plugins. This is how I started my development journey. When my plugin got approved for inclusion on I was ecstatic but there was a huge problem: releasing the plugin on meant dealing with an SVN repository. I can’t even imagine life without version control these days but back then I had no idea what SVN was or how to make it work.

Also, who even uses SVN anymore, right? The dev world has largely moved on to Git but for the time being we have to deal with SVN at least when publishing in the official plugin repository. If you are daunted by SVN, don’t worry because you’re not alone. I have met many seasoned developers who have no idea how to use it either ;)

So without further ado, here’s how to publish your plugin using SVN

Install an SVN client

On Windows TortoiseSVN is a good option. It comes as a standard Windows installer. Also, the actual SVN operations happen through the Windows UI so you won’t have to bother with the command line.

Checkout your repository

  • Open the approval email that you received from the plugin review team and copy the URL that looks like this:
  • In Windows open the directory where you want to check out your repository
  • Right click to reveal the context menu
  • Click the SVN checkout option
  • A checkout screen will open. Enter your repository URL in the first field and click okay
Windows TortoiseSVN checkout screen
Checkout screen

Now you should have the repository checked out on your system.

Checked out SVN repository
Checked out repository
Initial SVN repository structure
Initial SVN repository structure

Prepare for a commit

I am assuming that already have the plugin code ready. Make sure that the stable tag in the readme.txt is the version that you want to release. You can find out more about how to format your readme.txt file here. In this example we are assuming that the version number we are about to release is 1.0.0.

  • Open the repository and paste the plugin code in the trunk directory
  • Now open the tags directory in the root of your repository and create a new directory named 1.0.0 where 1.0.0 is your plugin’s version (you can of course use a different version if you like)
  • Paste the same code in the new tags/1.0.0 directory as well

Commit the new version

  • In your repository’s root, open the context menu and click SVN Commit. This will open a commit window.
  • Enter a commit message. Usually I just add the version number e.g. v1.0.0
  • In the “Changes made” section select all the files
  • Click okay
Windows TortoiseSVN commit screen

It will take a little while to publish everything. Congratulations! Your plugin is now in the official repository. Way to go WordPress developer!

Your plugin page will take a few minutes to refresh and start showing the latest version.

Leave a reply