Stefan Ledin 🇸🇪 Webbutvecklare
🇬🇧 Web developer

How to release a WordPress plugin

About a month ago, I finally released my plugin Responsify WP on wordpress.org. It was a fairly simple process, even though it was my first time doing this. But as always in this business, there were moments when I found myself asking Google for help. Therefore I decided to write this little guide on how to publish a WordPress plugin.

Your plugin are finally done and ready to meet the big world outside 127.0.0.1. But before you submit the request of adding it to wordpress.org, there are a number of things you need to do.

  1. Create a LICENSE.txt file.
  2. Create a README.txt file.
  3. Write documentation.
  4. Take screenshots.

The first two steps are required, but you and I both know that the other steps are pretty essential to.

License.txt

WordPress.org recommends using the “GPLv2 or later” licence. So what does that mean? Well, I neither know or care about the details. I just ended up using the license that comes with the WordPress Plugin Boilerplate, which I think is a great resource for plugin developers.

Readme.txt

This file contains all information about your plugin. The description, the FAQ, the release notes, all of that belongs here. The best thing you can do is to just copy and paste the example file. Notice that not all of the information is required, so you don’t have to make up a FAQ if you don’t want to. Once done, you can run the readme through the validator and you’ll get an error if required information is missing.

Documentation

I think this was by far the hardest part of creating Responsify WP actually. But at the same time I belive that any success for a plugin, script or framework depends on a really good documentation. I placed the most important parts of the documentation into the description section of the readme. The complete documentation is located at the GitHub page. You can release the plugin without documentation, but I don’t recommend it.

Submit the plugin

Now you are ready to submit your plugin for review. Yes, it has to be reviewed before you actually can upload it to wordpress.org. Fill out the form here and wait a day or two.

Subversion

Once approved, a Subversion repository will be created for your plugin. As a user of Git, Subversion (SVN) scared me a bit since the internet had told me that SVN sucks. But stay with me, it won’t bite you as long as you only use it for publishing and updating your plugin! The first step is to create a new directory where the plugin will be stored.

mkdir local-plugin-name

Then you’ll initialize SVN. I belive this is kind of like cloning a Git repository.

svn co http://plugins.svn.wordpress.org/plugin-name local-plugin-name

Copy all of your plugin files to the directory called ‘trunk’ that has been created inside ’local-plugin-name’.

Screenshots

If you have any screenshots, these should be placed in a directory called ’assets’. I first created that folder inside ’trunk’, but that turned out to be wrong. Instead, it should be placed directly in ’local-plugin-name’. As you can see in the readme.txt, the screenshots should be named screenshot-1.png, screenshots-2.png and so on.

Push to wordpress.org

Now it’s time to upload the plugin!

cd local-plugin-name  
svn add trunk/*  
svn ci -m 'First commit message'

And the plugin is beeing uploaded. Success! As you can see, what we do is basically the same thing as git add trunk/* and git commit -m 'First commit message' and git push.

In the next part, I’ll show you have to update the plugin.