Skip to content

Submitting a Plugin to the WordPress.org Repository: Initial Submission

Posted in Plugin Development, and WP Plugins

So, you’ve just built that awesome new plugin. It’s great, and you know others will love it too. The question is, how will they find it? You can always throw a plugin up on Github, or a similar site, but unless you do some good word of mouth marketing or happen to catch the eye of the right person, the number of users is likely to be small.

For most plugins, the way to really be found is to be hosted on the official WordPress.org repository. This is the first place everyone searches for the plugin they need before branching out, and for many users, the only place that they know to look. Getting your plugin added to the repository is not as simple as just adding a link to a list, though. It can be quite an involved process, so we’ll look at the steps you’ll need to take together. To do this, we’ll be using the plugin we created in our last series,

Initial Submission

Step 1: Clean Up Your Code

Before you submit your plugin to the repository, you’ll want to go back through your plugin and clean up any issues with your code. If you code with best practices in mind, this should be a quick process.

  • Check and make sure that you are not getting any PHP or JavaScript errors.
  • Variable names should make sense in the context they are used.
  • Function names should have a unique prefix: prism_js_yourfunction() as an example.
  • If there’s a WordPress function to do something, use it!
  • Properly enqueue all scripts and styles.
  • Don’t link to external files unless required (API call or something of that nature)
    • This is one I had to fix in my first submitted plugin, but luckily reading through the documentation let me catch it and fix before my plugin was reviewed.
  • Be sure that your main PHP file has the proper header.
  • If your plugin needs them, be sure to handle activation / deactivation, and uninstall (don’t leave a mess behind!)
  • More detailed examples here: https://developer.wordpress.org/plugins/

 Step 2: Create Your readme.txt File

Next, you’ll want to create a readme.txt to go along with your plugin. Make sure that this is in the correct format, and includes all needed information. You can find the official sample template here: https://wordpress.org/plugins/about/readme.txt. Just download a copy, and modify as needed. Make sure that you remove all of the default information, unless it applies! Spend extra time writing a quality description, as this will be the first thing that any viewers see.

After you have created readme.txt, you’ll next want to check it to make sure that there aren’t any syntax errors.WordPress.org hosts a great tool for this, the readme validator, which is found here: https://wordpress.org/plugins/about/validator/. Either upload your file and paste the link, or copy and paste the text directly. Once this is validated, you can copy it inside your plugin folder.

Step 3: Prepare Your Plugin for Submission

In order to submit your plugin, you must provide a zipped file, containing the plugin (with readme.txt inside) on a publicly accessible link. If you have a website, you can just host it there. If not, you can always host it on one of many direct link file sharing options.

Step 4: Submitting Your Plugin

Log in to your WordPress.org account (or create one if you do not already have one), and proceed to the plugin submission page, found here: https://wordpress.org/plugins/add/.

Choose a name for your plugin first. Note that this is not changeable, once it is submitted, so pick carefully. If you pick the name “My Cool Plugin”, the eventual address for your plugin will end with /my-cool-plugin. Before you pick one, make sure that it is not already in use. You may not use the name of an existing trademark or project, unless you work in an official capacity for them. You may not use the full name: WordPress, and you may not start the name of your plugin with the name of another popular plugin. For example, you cannot use Contact Form 7 Auto-mail, but may use Auto-mail for Contact Form 7, or CF7 Auto-mail.

You  can copy and paste the description from your readme.txt into the description box, and then paste the direct link to your plugin’s zip file that you uploaded in Step 3.

Step 5: Next Steps

Your plugin is submitted, and waiting for approval! You’re now in waiting limbo, but there are a few things that you can do in the meantime to make things go much more smoothly.

  • Plugin reviews typically are done in under a week, but that may vary.
  • When your plugin is reviewed, it will either be approved, or an e-mail will be sent with any changes that need to be made.
    • Note: You have 7 days to reply to these e-mails with corrections, or your plugin will be dropped!
  • Because of the last, you’ll want to make sure that you get the e-mails immediately. To help with this, it is strongly suggested that you white-list the e-mail address plugins@wordpress.org, as that’s where any notifications will come from.

Now it’s just time to wait patiently. In our next article, we’ll take a look at using SVN, and what you can do once your plugin has been approved. Until next time!

Edit: A cleaned up version of this plugin can be found in the WordPress.org repository, here: https://wordpress.org/plugins/codeblocks-extended/