Guide To Publishing A WordPress Plugin To The WP Directory
By the fall of 2004, WordPress had rolled out 46 plugins. Today, after thirteen years, the WordPress Plugin Directory features staggering 49,402+ plugins with over 1,191,468,914 downloads. This is how the WordPress Plugin Directory looks in April 2017:
WordPress Plugin Directory
The plugins which feature on the WordPress Plugin Directory are free to use and share. These WordPress plugins are licensed under the GPL (General Public License). It is an exclusive place where some of the amazing plugins have been rolled out. And if you want to be a part of this elite club, read along and know about the essentials of publishing a plugin.
In this post, you will have a complete tour of the process of submitting a plugin to the WordPress Plugin Directory. You will also have a step-by-step instruction manual on how to integrate your plugin to WordPress central Subversion repository on a Windows PC as well as on a Mac.
Why Publish Your WordPress Plugin?
There are many reasons to publish your WordPress plugins in the WordPress Directory. Some of the obvious examples are:
You can track down the total number of downloads and the active number of users to the precise metrics.
Adding a plugin to the WP directory means getting instant feedback from the actual users in the form of comments. The feedback may be in the form of a bug report, suggestions to improve your plugin etc.
The WordPress plugin directory is accessed by webmasters and enthusiasts daily. People log into the directory through their WP admin panels. So, the plugin gets a lot of exposure. You can easily attract new users and they may donate as well or buy the premium version.
Easy To Update
If you have launched a plugin through your website in the past, you would be well aware of the hectic scenario of notifying all the users about any updates. Adding the plugin to the WordPress Plugin directory enables you to address all the users with ease.
If your plugin is able to make it’s way to the official repository, the WordPress community will consider you as a credible developer. People generally prefer the plugins that are in the repository as compared to the ones on the third party websites.
The WordPress Plugin Submission Process
Here, we will discuss the nuts & bolts of submitting a WordPress plugin. The process has been broken down into easy to understand steps and relevant screenshots, making the plugin creation adventure seamless for beginners as well.
Follow The Plugin Guidelines
The easiest way to save yourself from the dilemma of wasting any time or efforts over plugin submission is by following the guidelines effectively. Ensure that the WordPress plugin development is compliant with all the guidelines before you forward it to the plugin directory.
Some of the primary rules to be followed while submitting your plugin to the WordPress plugin directory include:
- Ensure that your plugin is compatible with the GPL
- The plugin should ask for a user consent before it stores any information
- The plugin should not spam its users
- The code syntax should clear and accessible
- Should not perform any morally offensive practices
- Should not embed external links on a public website
Confirm The Plugin Name From The Directory
Log in to wordpress.org/plugins and type in the desired name you wish to have for your plugin. Here’s a screenshot explaining the name search on the WordPress plugin directory.
If there is no plugin with the same name, it might be the case that a plugin might be available but the admin has not shared the initial Subversion commit. Hence, try to submit your plugin to the directory right away to ensure that you are able to register the name. If the plugin name has been taken, you will have to come with a different name.
Create A Robust Plugin
After you have created your plugin and tested it thoroughly, you need to update the code so that the functionalities of the plugin work in the desired way.
Audit The Readme File
The ReadMe file is used to fill out the directory page of the plugin. Here, you need to enter the following:
- Name of the plugin
- Authors of the plugin
- Donate link
- Compatible WordPress versions
- License (GPL)
- Plugin description
For the plugin tags, it is advised to pick the tags similar to the ones used by similar plugins or the common and relevant ones. You can choose tags by checking out the readme.txt file of similar plugins or looking at the bottom of their page.
Once you have filled out the information, write the main description, steps of instructions, screenshots and frequently asked questions for your plugin. When it comes top adding the plugin screenshots, the more the better. You can also validate your readme file with the ReadMe Validator. The link for the validator can be found in the plugin approval email, which has been discussed later in this post.
Submit Your Plugin
After following the steps mentioned above, it is time to submit your plugin to WordPress for a manual review (plugin directories are analyzed manually).
You need to create a WordPress account first by filling out a registration form as below:
Now, it’s time to add your WordPress plugin.
Enter the name and description for your WordPress plugin. For the URL, you will have to compress the plugin files. Upload the plugin.zip file to Google Drive and insert a public link to the zip file.
Wait For Approval
All plugin directories are analyzed manually. Although the response is quick, you might have to wait for a little before they get back to you.
It may take up to 8 hours before your plugin is reviewed and approved.
Plugin Approval Email
Once WordPress authenticates your plugin, you will get a confirmation email from them.
Store Plugin Files In The WordPress Subversion Repository
A subversion is a control tool that enables an admin to track all the tweaks made to a plugin and get back to the older versions of the plugin if required.
Since your plugin has been approved by WordPress, you need to copy it in your WordPress Subversion repository. The repository is the place where the plugin files will be stored. If someone needs a copy of your plugin, they can get it from the repository. Yet, only the admins who are authorized in the readme file can make any modifications to the repository.
There are two elementary methods by which you can store your plugin in the WordPress Subversion repository. First, it is for the Windows users and the second is for the ones using a Mac. Let us begin with the instructions or Windows.
On A Windows PC
If you want to publish your plugin on a Windows computer, you will have to download a compatible version of the Subversion client. The popular ones are:
- Tortoise SVN: For Windows users with the GUI feature
- SCPlugin: For Mac users with the GUI feature
- Versions: Another option for Mac usersAmong all the Subversion clients available, the Tortoise SVN is a popular choice. Let us see the installation process for the Tortoise SVN:Once the download is complete, open the Setup Wizard as below.
Click the Next button.
Select the first option where it says to accept the Agreement and Conditions and click on Next.
Additionally, if you need the command line tools, select the command line client tools and go to:
‘Will be installed on the local hard drive.’
Click on the Finish option to confirm the installation. Now that you are done with the installation, you are all set to work with Subversion (SVN). Open the Windows Explorer. Select the directory you want your WordPress SVN repository to be placed in. Now, select that directory and right click on the icon. This will open a window as below:
Click on the checkout drop down menu.
Enter the repository URL into the field. Go to your approval email by WordPress where you can find that URL. This is generally in the format like:
Click on OK for confirmation.
Once you get the dialog box similar to the screenshot above, it is verified that the checkout was successful. Now, all of the WordPress central repository files and directories have been downloaded on your local computer and in the directory which you picked.
The directory that you chose should now hold assets, trunk, branches and tags directories. You need to add all of your plugin’s files to the newly added trunk directory. Then, you need to open up Windows Explorer, click on your SVN repository directory icon, and right click on that directory icon.
Select the SVN Commit option. The following screenshot displays how the different files are added and customized in your SVN repository. Remember, select only those checkboxes which you wish the repository to track. Preferably, select all the checkboxes so that all the plugin files are added to the central repository.
Click on OK. With this, the modified, as well as the newly added files will be available in the central WordPress SVN repository and your local computer. If you are using more than one computers, you should ensure that you run the SVN Update feature to collaborate your local repository with the central WP repository.
This can simply be done by using Windows Explorer to locate the SVN repository directory and selecting it. Right click on the directory icon and select SVN Update as shown:
Select the SVN Update option from the drop-down menu. As mentioned earlier, it will ensure that the copy is up to date as per the central WordPress repository.
On A Mac
On a Mac, the plugin is stored in the Subversion repository through the command line. Open the Terminal application. Locate the parent directory for your plugin.
Use cd ‘directory name’ to open a directory
- Use cd .. to move to a parent directory.
- Use the ls -a to list all of the files and directories.
When you access the parent directory, run the following command in the terminal window:
$ svn co https://plugins.svn.wordpress.org/name name
Here, svn denotes Subversion and co is for checkout.
This command adds all the central Subversion repository files into the local repository.
Important: Replace https://plugins.svn.wordpress.org/ with the URL that is provided in your plugin approval email by WordPress.
It should be in the format of:
Replace the name of the directory at the end of the command with the name you wish to keep.
You will be asked for the following options:
(R)eject, accept (t)emporarily or accept (p)ermanently?
Type in ‘t’ or ‘p’ and enter. You will receive the message to confirm that the plugin directory has been created on your computer as well as the tags, trunk and branches are added in the Subversion repository directory.
Place all of your plugin files in the trunk directory. Now that you have your plugin files in the trunk directory, you need to add those files to your Subversion repository so that they can be tracked. You can do this by running the terminal command as mentioned below:
$ svn add trunk/*
You then need to push the changes made to your local repository to the central WordPress repository by running the following command in your terminal window.
$ svn ci -m Add first version of plugin
Now, you will be asked to provide your username and password for the WordPress account.
Once these credentials are entered and verified, the plugin files will be sent to the central repository. You will get a Transmitting File Data message, followed by a Committed revision message. This will be similar to the following:
Transmitting file data
Committed revision 1204654
That’s it. You will soon get an email from WordPress which will let you know of the new commit.
If your plugin features multiple contributors or computers, it is mandatory to run the update command prior to committing any modifications.
$ svn up
This replicates the changes from the central WordPress repository to the local plugin repository.
Sophia is a renowned WordPress developer by profession and likes to share here experience through blogging. She can be a great resource for those who are looking to hire WordPress developer in the USA, then you can get in touch with her.