How to submit to WordPress Plugin Directory

It’s the time to start uploading to extension gallery. We have created two plugins so far:

I will describe the process on the example of the second one. You can find it here: https://wordpress.org/plugins/demo-shortcodes/. To install it from the dashboard, go to Plugins/Add New, change search criteria to Author and look for kantoniak.

Plugin preview

Overview

Everything takes time and so is with sending plugins. You can expect the whole process to take 1-2 days.

You need some preparations before the plugin can be sent to review. The first thing to do is to read the guidelines carefully. It explains what is allowed and what not. Important notice: your plugin has to be GPLv2 Compatible.

When everything is fine:

  1. Prepare readme.txt file
  2. Create assets for the plugin page (banner and icon)
  3. Submit plugin for the review
  4. Wait for approval (takes time)
  5. Push to central repository

If you follow the steps carefully and not ignore any problems, the submission should go smoothly.

Creating readme.txt

There should be a readme.txt file in the main directory of the plugin. The syntax is somehow similar to Markdown, so you should get it done quickly. WordPress provides an example here. Think about the content carefully since it’s what end users will see. There is a generator for lazy people: https://generatewp.com/plugin-readme/.

I created a very simple file since the feature set is not too big: https://github.com/kantoniak/kantoniak-demos/blob/master/readme.txt.

There is a part for screenshots, it contains descriptions for images:

== Screenshots ==
1. Box preview
2. Media button modal

The files itself should be placed in the assets/ folder along with the contents. Remember to minimize image sizes.

Adding screenshots and banners

The resources folder should contain single screenshot-i.(png|jpg) for every image. Apart from this, we can (it’s optional) submit images that will be visible in the gallery. A typical set will contain a single 772×250 banner and a 128×128 icon. You can read more about assets folder here.

$ ls -l assets/
total 128
-rw-r--r-- 1 kantoniak 197609 7269 Apr 14 14:23 banner-772x250.png
-rw-r--r-- 1 kantoniak 197609  768 Apr 14 14:24 icon-128x128.png
-rw-r--r-- 1 kantoniak 197609 4701 Apr 13 20:30 screenshot-1.png
-rw-r--r-- 1 kantoniak 197609 5791 Apr 13 22:20 screenshot-2.png

Sending for review

You need to have your plugin reviewed manually by somebody from the WordPress team. You sign up and submit ZIP file on this page: https://wordpress.org/plugins/developers/add/.

In my case, there were ~110 plugins in the queue, 15 of them for initial review. Then we wait for approval. In my case that was about 10 hours.

Pushing to central repository

When your extension gets approved, you will get an email saying you can now push to SVN. Granting access can take up to an hour. You should install SVN command-line tools if you haven’t already. I show the commands on the example of my plugin.

Set mime-type for images

Many people have a problem with publishing assets to the central repository – images are downloaded instead of being shown. We set mime-type before pushing anything. Create file ~/.subversion/config and insert:

*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg

Clone the repository

$ mkdir demo-shortcodes

# clone repo
$ svn co https://plugins.svn.wordpress.org/demo-shortcodes/ demo-shortcodes
A demo-shortcodes\assets
A demo-shortcodes\branches
A demo-shortcodes\tags
A demo-shortcodes\trunk
Checked out revision 1638054.

# move banner etc. here and start tracking
$ svn add assets/*

# add plugin files to trunk folder, command will show what files were added
$ svn add trunk/*

# commit and push
$ svn ci -m 'Initial revision' --username kantoniak --password password
Adding  (bin)  assets\banner-772x250.png
// other files...
Adding         trunk\template-shortcode-demo.php
Transmitting file data ........done
Committing transaction...
Committed revision 1638060.

Note for .git users: Running svn ci will commit and submit your changes. Try not to make temporary commits 🙂

Review plugin page

In five minutes all changes should appear in the repository. WordPress serves content from CDNs and image propagation can take an hour or so. In my case, it was really quick.

I myself had a funny glitch – plugin page was saying I made last modification 2019 years ago 🙂

That was quite long ago

It occurred that WordPress team was fighting a bug just when I published the extension: https://meta.trac.wordpress.org/ticket/2740. Now everything works fine and you can download the plugin.

Resources

Leave a Reply

Your email address will not be published. Required fields are marked *