A while back I wrote about listing your plugin to the official WordPress plugins directory. The tutorial was for windows and I have been on the look-out for a Mac version. Since I have been unable to find one, I will present to you a step-by-step tutorial on how to add and modify your WordPress Plugin using a Mac.
To begin this tutorial, I first have to make some assumptions.
My Assumptions
- Your plugin has already been approved over at WP Extend Plugins.
- You are running at least OSX Tiger
- You have WordPress locally installed. If not, please read Jeff’s tutorial on installing WordPress locally.
- You already have Subversion installed. If not, here’s a good tutorial on installing Subversion on a Mac. If you have Leopard, Subversion is already installed.
- You have downloaded and installed svnX. svnX has a nice GUI for those who don’t like to use Terminal commands.
Step 1. Ensure the Subversion (svn) Path is Correct
After you’ve installed svnX, go to its Preferences screen and ensure the path to your svn install is correct. Mine is set up at ‘/usr/local/bin‘, but yours may be different.
Subversion Path Interface
Step 2. Access Your Subversion Repository
Using svnX, open up the “Repositories” window and add the path to your plugin using the “+” button.
From there, enter your plugin information:
- Name: Your Plugin’s name.
- Path: The svn path to your plugin. You should have received this in your approval e-mail.
- User: Your WP Extend username.
- Pass: Your WP Extend password.
Accessing Your Repository
After you’ve entered your information, double-click your repository to open it up. You should now see a screen (assuming your credentials are correct) similar to the screenshot below:
Repository View
If you have never added your plugin before, the directories will be empty.
Step 3. Check Out Your Repository
Select the “trunk” directory and right-click it. You’ll want to select “Browse as sub-repository“.
After selecting to view as a sub-repository, you should see a view of only your trunk’s contents. If you have never added your plugin before, this directory will be empty.
Sub-Repository View in svnX
Once in the sub-repository view, you can now check out your repository. Click the “svn checkout” button to check out your repository.
From there, browse to your local WordPress installation’s plugins folder, and add a new folder and give it the name of your plugin. Please note that this should be the same folder name you would normally give your plugin prior to a release.
Add a new folder to your plugin’s directory.
After adding the new folder, click the “Open” button. The “Working Copies” window for svnX should now be showing.
Working Copies Window after a Checkout
Make sure you update your User and Pass to reflect those on WP Extend.
Step 4. Add or Modify Files
In the case of my plugin, I am just editing a few files. In your case, you may be adding plugin files for the first time.
Double-click your plugin in the “Working Copies” window. You should now see a screen similar to the one shown in the screenshot below:
Working Copies Window
The best way to edit or add your plugin is through Finder. Click the “Reveal in Finder” button.
From there, add or modify your plugin files.
Step 5. Commit the Changes
After adding and/or modifying files, hit the “Refresh” button after you have opened up your Working Copy.
If the file is new, you will need to add the file to the repository by clicking the “Add” button. If an existing file is modified, it will show a “M” next to it.
To commit the changes, select the files you want to commit and select the “Commit” button. Type in a detailed message and click “Commit” again.
Please see the screenshot below for the commit screen:
Working Copy Commit Dialog
Step 6. Tag Your Release
Assuming you have prepared your plugin’s readme file (see this tutorial, Step 7), head over to your plugin’s repository (Open the Repositories Window in svnX and open your plugin – See Step 2 above).
You should see the changes you have just committed. If not, try clicking the “Refresh” button (a very small circular arrow).
To “tag” your release, select your “trunk” directory and click “svn copy” in the repository window.
To successfully tag your release, follow these steps:
- Select the “tags” directory.
- Add an appropriate version number for the “Target Name”. This should match the stable version in your plugin’s readme file.
- Add in a commit message. You can just state that you are tagging a release.
Tagging Your Release
Step 7. Verify Everything Worked
Head over to WP Extend Plugins and browse to your plugin (wait about fifteen minutes after you’ve tagged your plugin).
Make sure the versions match and that the changes you made were indeed captured. If everything is good, then you’re done.
Conclusion
Within this article, I demonstrated how to modify or add your plugin to the WordPress plugin repository using a Mac and svnX.
If you have any questions or suggestions on how to make this tutorial better, please leave a comment below.
Or for Linux, use kdeSVN.
Thanks Aaron. Here’s a link to a Linux tutorial of the same topic.
Great work on this tutorial, this will help a lot of those Mac’ies out there 🙂
I do not use Linux ,but I want to publish my plugin.A anti-spam plugin.
@neekey,
What OS are you running? There are tutorials for WP Extend that now cover the main operating systems.
Unfortunately it’s the first assumption which is the main stumbling block here. Is it me or does it seem to be taking longer and longer to get a plugin approved on WordPress extend?
I’ve switched to using Google Code for my main SVN repositories (instant setup) and only add the plugins to WordPress extend every now and then.
So a tutorial for Google code would be great, or one to show the simplest way to update two SVN systems with one code base (which I still struggle with). Also I find Zigversion to be a much easier to use SVN application – a lot more “Mac-like”.
Barry,
Thanks for the program suggestion. I’ll give it a try.
Agreed that WP Extend should make plugin submission automatic. Not sure why there’s a waiting period.