SVN Cheatsheet for the WordPress Plugin Repo
Using SVN to submit and update plugins in the WordPress.org repository.
I’ve created this guide for my own personal reference, hopefully it can be helpful to others too. Are you submitting your first plugin to the WordPress Plugin Repository, or it’s been a while and you need a SVN refresher course?
Last Updated:
- Commands in this guide are what works on Mac and YMMV on other machines.
- This is not an exhaustive tutorial or complete in any manner. It is a space to dump information from my brain that I find helpful to access in the future. I’ll try to include as many helpful references as possible but you may still need to do more Googling. ❤️
WordPress Repository
Quick links for helpful WordPress plugin repository information:
- Plugin Guidelines (rules and expectations)
- Developer FAQs
- Add Your Plugin (submission form)
- Using Subversion
- Example: Starting a New Plugin
- Example: Editing Existing Files
- Example: Tagging New Versions
SVN Commands
? Lookout world, we’re using terminal so it feels like we’re real programmers now!
Install / Update SVN
Let’s check what version of SVN is installed.
svn --version
If it isn’t installed, install it((We’re assuming homebrew is already installed. Depending on your machine you may need to do some extra thingies.)).
brew install svn
If it’s outdated, update it.
Add Files
We need to actually add things after they’ve been committed.
svn add FILENAME
Sometimes it doesn’t want to be added so we can try forcing it too…
svn add --force FILENAME
SVN Cheetsheet
Master list of commands for time-saving reference.
svn add
Add a new file to the repository; but only after you’ve done an svn commit
.
svn admincreate
Creates a new, empty repository.
svn checkout
svn co
Checks out a working copy from the repository.
svn commit
Sends your changes back to the SVN server.
svn delete
Delete a file from your working copy of the repository.
svn diff
Reveals the differences between your working copy and the copy in the master SVN repository.
svn help
Provides a summary of available commands.
svn import
Commits an unversioned tree of files into a repository; and creates intermediate directories, if needed.
svn info
Displays information about a local or remote item.
svn list
See a list of files in a repository without creating a working copy.
svn log
Shows log messages from the repository.
svn merge
Combines two different versions into your working copy.
svn move
Moves a file from one directory to another (or renames it).
svn revert
Reverts changes in your working copy, as well as property changes.
For example, you can use svn revert
to undo svn add
.
svn shelve
Stores your changes without submitting them.
svn status
Prints the status of working copy files and directories.
svn update
Updates your working copy with changes from the repository.
? CRITICAL
Don’t forget that submitting a plugin to the WordPress repository is not actually as terrifying as your brain wants to convince you it is.
If you’re still doubting whether you are ready to submit a plugin, practice using git and GitHub first through terminal commands alone.