If you have a brand-spanking new plugin which you’ve recently developed and are excited about unleashing it to the world then the first thing you should probably do is to submit it and promote it on the wordpress.org site.
This post will explain how to do the submission of your plugin using the subversion repository for users of the windows operating system because the instructions given on wordpress.org assumes you have a either linux or other command line operating systems.
To submit and promote your plugin on the wordpress.org site you will need to follow a few steps which are outlined below.
- Read the Plugin Submission and Promotion instructions.
- Sign up so that you have a developer’s account in wordpress.org.
- After following the instructions above you will eventually get an email stating that your plugin has been approved for submission.
Within this email you will get instructions about how to submit your plugin files using the subversion repository system. The instructions given will not apply to you if you are using windows. See my instructions below about how to do this using windows.
Use the following instructions to submit your plugin files using subversion for windows:
Step 1: Download and install TortoiseSVN on your windows machine.
This is a windows interface to the Subversion repository system.
Step 2: Create a directory somewhere on your hard drive which you will use as the place for your local repository. You can name it the same as your plugin name or whatever you want.
This will be directly linked to the repository hosted on wordpress.org where people can download your plugin.
The preliminary steps above would have ensured that you will have already received your own repository hosted by wordpress.org. You will receive the link to your repo in your approval email and it will look something like the following:
If you click on your repository link you’ll see 3 folders as follows:
The above folders will be empty at the moment because you haven’t submitted your plugin yet.
Step 3: On your computer, go to the folder you created in step 2) using windows explorer and then right-click and select “SVN Checkout” as shown below:
Step 4: You will then get a window which will ask you to specify the URL of your plugin repository. Paste the URL sent to you in your approval email in the field called “URL of repository” and as shown below:
The field called “Checkout directory” should be the new folder you just created on your windows system.
Leave all other settings as they are and then click the “Ok” button.
After clicking the “Ok” button the Tortoise SVN will log into your remote repository and download the three folders we talked about in step 2).
Step 5: You should now see 3 empty folders called “branches”, “tags” and “trunk” on your computer as shown:
Now copy your plugin files and readme.txt into the trunk folder.
Step 6: After you’ve copied your plugin files right-click the trunk folder and select SVN commit:
This will now upload your plugin files from your local machine to the remote wordpress.org repository.
Step 7: Ensure that your plugin files have been uploaded to the remote repository by visiting the trunk folder (http://svn.wp-plugins.org/<your_plugin_name>/trunk) and confirming that your files are there.
Step 8: Now we need to add some tag information which will tell people which is the current and stable release of your plugin.
To do this right-click the trunk folder and select TortoiseSVN->Branch/tag as shown below:
Step 9: Add the string “/tags/1.0” at the end of your plugin repo path in the “To path” field as shown below and then click “Ok”:
Step 10: Your local tags folder on your windows machine will currently be empty because the above step would have created the new subfolder called “1.0″ on the remote repo. To synchronise/update your local repo with the remote repo simply right click the folder and select “SVN update“.
That’s all there is to it!
Now you have successfully uploaded your plugin to the wordpress.org repository and currently your local windows folders and the remote repository folders are in synch.
So in future when you make some new changes to your plugin which you want to release to the public, just do the following:
- Make any changes to your code by editing and saving the appropriate files in the trunk folder and performing an SVN commit as in step 6.
- Then set latest version to 1.1 or whatever by following steps 8 and 9.