I’ve just managed to get my first WordPress plugin approved and added to the official WordPress plugin directory which is cool for me. It’s nothing major, mainly something to help my own clients but useful for anyone who uses WordPress and finds it hard to do some of the most common functions. You can view/download it below. Please rate it!:
Now simple as it is in function, it was no easy feat getting the plugin written, approved and added, with plenty of standards to adhere to and processes to be learned. For example I found out that you can’t import or host content on your own site that’s part of a plugin. You need to include all files in the plugin folder. I was hotlinking to files on my own hosting!
The trickiest part by far was figuring out how to upload the files to WordPress. They have a complex system for doing that called SVN/Subversion which is a version control system. The official WordPress help on how to manage this side of things is poor. They expect you to use command line to get it done which I’ve no clue about. After some googling and reading of WordPress support pages, I found a program called TortoiseSVN which has a graphical user interface. Much handier to use. Here’s how:
- After downloading and installing TortoiseSVN, create a folder on your computer to house your plugin files. I called mine SVN.
- TortoiseSVN is installed as Windows shell extension so there’s no program to run as such, it’s all right-click based. If you right-click on the SVN folder you created above and choose “Create Repository Here” you can get everything set up automatically.
- Once you’ve done that if you again right-click on the SVN folder and choose “SVN Checkout” you’ll be able to download the typical wordpress plugin folder structure created for you when the plugin was approved which comprises of 3 folders – Branches, Tags and Trunk. This checkout process will ask for the url to your plugins repository which will have been emailed to you on approval. Mine looks like this – http://plugins.svn.wordpress.org/help-menu/
- You can now add your plugin files (locally) to the newly created sub folder in the SVN folder which will me named according to your plugin name. Mine is “help-menu”. The plugin files (not folder) go directly in the “trunk” folder and a copy of them should go in a sub folder of “Tags” named with your plugin version, “1.0” in my case.
- Once you’ve added the plugin files you can now upload them to WordPress by right-clicking the plugin folder in SVN and choosing “SVN Commit”. You’ll be asked for a username and password at this stage so put in your WordPress.org login details.
- That’s pretty much it. The WordPress SVN should auto-update in a few minutes and your plugin will be live and ready to download!
Using Subversion with the WordPress Plugins Directory
FAQ about the WordPress Plugins Directory
WordPress Plugins Directory readme.txt standard