Cogito ergo sum

How to upload your WordPress plugin to the WordPress Plugins directory using SVN on Ubuntu2 min read

Background

Today my third WordPress plugin has been approved and added to the WordPress Plugins directory. A usual action after your plugin submission has been approved, is to push the code to the WordPress SVN repository. I must confess that I was never able to memorize all the commands and steps to push the code. I am very good at Git and using it because I have been using it for more than 12 years! However, I suck at SVN and its command! Therefore, I decided to write this small how-to in the first place to help myself and also other people like me who always struggle with remembering the right commands in the right order.
Disclaimer: WordPress itself has a nice guide for this, but I find it personally too detailed. It could be good for people who use it for the first time, but it is definitely a burden if you know what you want and do, but you only need the commands!

For this how-to item, I assume you have already installed SVN on your Ubuntu/Unix-based machine. In addition, I will be using the slug of my accepted plugin as an example here, you have to use your own!

The steps

  1. Have the SVN link to the plugin by hand. The link is usually sent by the WordPress review team upon acceptance. In my case it was https://plugins.svn.wordpress.org/webkew-image-dominant-color-generator . Notice the svn in the URL.
  2. From the command line execute the following command svn co https://plugins.svn.wordpress.org/webkew-image-dominant-color-generator this will create a folder with the name webkew-image-dominant-color-generator . This command will create three sub-folders assets tags and trunk
  3. Enter the newly created directory cd webkew-image-dominant-color-generator/
  4. Move your plugin code to the trunk folder.
  5. Move the assets that belong to your plugin to the assets folder.
  6. Execute svn add trunk/* and svn add assets/*
  7. Execute svn ci -m "YOUR MESSAGE" to commit the changes of both folders.
  8. Execute svn cp trunk tags/1.0.0 to copy the content of the trunk to the subfolder 1.0.0 within the tags folder. You do this to tag a version of your code before you publish it to the WordPress Plugins directory.
  9. Finally, execute svn ci -m "Tagging version 1.0.0"

You may be asked at some point to enter your WordPress credentials to be able to push to the repository, don’t panic, just provide your password when asked, and then you are good to go!

About the author

Peshmerge Morad

a machine learning & software engineer based in Germany, whose interests span multiple fields.

Add comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Cogito ergo sum