Can i do plugin commits directly from a plugin folder inside an installation using the Trunk SVN

All we need is an easy explanation of the problem, so here it is.

I have several virtual hosts setup, three of them pull files via SVN when needed(though only the trunk folder actually needs this), using SVN for other versions make for easy patch creation, or easy file replacement if i hack a core file.

enter image description here

My question is whether i can checkin a plugin from directly inside the plugins directory?

So take this plugin located in wp-content/plugins/post-ui-tabs for example.

enter image description here

Can i use that folder to house my plugin or does my plugin’s folder need to mimic the directory structure of the SVN, eg..

  • brances/
  • tags/
  • trunk/


Thanks for the feedback guys! All helpful in getting to understand local vs remote directory structure.

I’ve got my plugin up in the repo now, see here.
Post UI Tabs

Direct answer to my question, was Yes, i can do commits directly from my plugins folder, i simply have a typical local structure of wp-content/plugins/myplugin which is just a checkout of I commit directly to trunk, then when i want to push a new version, i branch onto a tag(do that directly in Tortoise) and update the readme.txt stable tag to reference the new tag, ie. the operation creates the remote with all my files, and makes that available to uses, whilst my local working copy remains on trunk(i’ll blog about it in the future when i’ve had more practice).

Easier then i thought!… thanks for all the advice guys.. all valuable pieces of information, Andy i felt your answer helped the most, so i’m giving you the accept, everyone else i still really appreciate your help, unfortunately i can only accept one answer… but thank you all the same.

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

I run a WordPress checkout of trunk, a branch, or a tag. This way I can switch WordPress versions easily:

svn sw
svn sw

In wp-content/plugins I have a trunk checkout for each of my plugins:

cd wp-content/plugins
svn co stats

I do my work on the stats plugin (updating the changelog in the readme), then I commit directly from there:

emacs stats.php readme.txt
svn di stats.php readme.txt
svn ci stats.php readme.txt -m "stats: fixed issue with SSL"

When it’s time to push a new version, I copy from trunk to the new tag:

svn cp -m "stats: tag 4.2.1"

Finally I bump the stable tag in the readme and commit that to trunk.

emacs readme.txt
svn di readme.txt
svn ci readme.txt -m "stats: bump stable tag to 4.2.1"

I do all of this in Linux or Mac. In my former life as a Windows user, I’d SSH (PuTTY) into a Linux box or (last resort) virtualize Linux.

Method 2

First of all, I’m also a beginner in SVN. I’m happy when it’s working 😉

I’m not completely sure if I understand your question correctly. You have checked out the WordPress trunk and inside this working copy, you want to checkout a plugin from the WordPress plugin directory?

Well, I don’t know if this is going to work – But you could store your wp-config.php and wp-content directory outside of your WordPress directory as explained by Otto in his article.

For example

Document Root: /var/www/

         pluginA/ (svn-external to WordPress plugin repo)
         pluginB/ (svn-external to WordPress plugin repo)
         pluginC/ (local copy)
     wp-trunk/ (svn-external to WordPress trunk repo)
     wp-31/ (svn-external to WordPress branches repo)

This way you could checkout multiple versions of WordPress and all your desired plugins with svn-externals. The hole site1 could then also be stored in your own site1 svn repo so that your buddy only have to checkout this repo from your svn server.

Method 3

Disclaimer – I am also beginner with SVN.

Is this possible?

Should be. I am using similar setup, just with WP checked out not from official repository.

Are externals what i’m looking for?

Nope. Externals are links between repositories. WP plugin repository ignores them for packaging downloads (so they are useless with it). And as I understand you are not going to need your plugin in multiple repositories.

Can i have an plugin repo inside an SVN’ed folder?

The folders are “SVNed” individually. Every folder has its own SVN meta info and there is no obligation for sub-folders to belong to one SVN with tree root. Just be attentive so that new files are added to repository they should be and such.

or does my plugin’s folder need to mimic the directory structure of the SVN, eg..

Nope. You just commit your folder to trunk, then tag/branch trunk into tagged version when you have new release. That is of course if you don’t need to retain older version of plugin on local computer.

I wish this were a simple case of reading the manual, but SVN does seem more geared toward non-windows users, and i’m struggling to find relevant info on anything that isn’t clear.

I recently asked this question Any guides on using WP SVN with IDE clients? and from answers and poking around best manual type of thing that I found is documentation that comes with TortoiseSVN. It is for Windows and exactly for people who are not very much into command line SVN commands.

Method 4

My question is whether i can checkin a
plugin from directly inside the
plugins directory?

By ‘checkin’ do you mean updating the plugin on (svn commit) or downloading the plugin from (svn checkout) ?

Plugins on do require the traditional trunk branches tags structure.

If you want to work on an svn checkout of a plugin within an svn checkout of wp core, you can checkout just the trunk folder:

svn checkout wp-content/plugins/your-plugin-name/

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply