Last week, we saw how to create a really simple WordPress plugin allowing GitHub Gist insertion into shortcodes. So today it’s time to see how to publish the plugin to the official WordPress Plugins Repository using the new version of Coda from Panic Inc. and its awesome SVN feature. Maybe you already tried to publish a WordPress plugin using and SVN (with Versions, SVNx, or with the Terminal) on your Mac? I did… and i found it pretty complex and not fun at all. That’s the main main reason why i haven’t published many of many plugins, because SVN was a huge waste of time for me. But with Coda 2 it’s a pleasure! Let’s see that!
First Step: Plugin Addition Request
The first step is simple and is common to any available methods to publish a plugin to the repo: you have to tell WordPress that you want to add your new plugin to the repo so that an access got created for you in order to store the files on WordPress servers. All you have to do is to go on this page: Add your plugin to the WordPress repository (please note that you need an account. Create your account here). Here is the form you’ll see :
You have to fill in the form, enter your plugin name, describe it in a few lines, and add the plugin URL. Note that the URL does not need to be valid for now, but i encourage you to create the page before and to keep this URL as the main plugin page (where you can describe it, add links to the support or whatever). Here’s what i inserted for Easy GitHub Gist Shortcodes:
Once it’s done click on “Send Post”, and after page refreshment you’ll see this message:
That means that WordPress took into consideration your request with success. You now have to wait that WordPress send you two emails, the first once to tell you that the plugin request is accepted, the second one (about an hour later) with your SVN access. Those emails can take until 24H to arrive.
Step 2: Get your SVN access
The 1st email from WordPress you receive it should look like this one:
Step 3: Configure Coda 2 for SVN use
[alert type=”info”]Note: Since OS X Mountain Lion, you have to manually setup Subersion[/alert]
Here are the steps to configure Coda 2 in order to publish your plugin to the repository:
- Go to “Sites” section under main menu “View” or press Cmd + 1
- Add a new site (at the bottom left)
- Fill in the nickname (it’s your plugin name)
- Fill in the local root path (for the moment target to an empty directory)
- Then click on the “Source” Tab
- Click on “Checkout Subversion Source”
- Paste the SVN url you received in the WordPress email in the “Repository URL” field
- Enter your nickname and your password (it’s your WordPress account data)
- Click “Checkout”
There’s now a message that says that the transfer is being done…
When the message disappear, the transfer is complete and you can click on “Save”. Go now to the local directory you previously created at step 3.4 you’ll see that there are now some new directories: branches, tags, and trunk. These news folders came directly from the WordPress repo.
You can now copy all the files of your plugin folder under “trunk”. Don’t forget to add a readme.txt file (more information on Pippin Williamson website by David Decker). Once it’s done double click on your new Coda site. You’ll notice on the bottom left of the page a little message appears: “Activity” > “Refreshing Status for …”. That means that Coda is trying to find the differences between the local directory and the online directory. When the message disappear, click on the little “Home” icon in Coda 2 sidebar, then click on “SCM” (this icon should have a little bullet with the number of files of your plugins).
Your plugin files are now listed, and in front of each, there’s a “Add” button. Click it for every file (if there are too many click on “Update”).
Click now on “Commit” or “Commit All”. You’ll be asked to describe the action you’re doing, write something like “First Release”. “Activity” message is now “Commiting files”. When it’s done the files list disappear and you should receive a new email from WordPress…
And … Congratulations, your plugin is now online on the WordPress Repository ! That’s so simple with Coda 2 ! You can customize your readme.txt file and add a nice banner to your plugin !