Stefan Ledin πŸ‡ΈπŸ‡ͺ Webbutvecklare
πŸ‡¬πŸ‡§ Web developer

How to update a WordPress plugin

Now when your plugin finally has been uploaded to, you’ll eventually want to update it. That’s what I’m going to explain how to do in this second post about publishing and updating a WordPress plugin.

As a user of Git, I found this process a bit tricky at first. You have to create a new “tag” to get to understand that you have released a new plugin.
With Git, you would do this:

$ git tag 1.1.0

But with Subversion, you actually have to create a new folder inside the tags directory.

$ mkdir tags/1.1.0

But before you do anything more, the version number has to be updated in the readme.txt (stable tag) and in the php file containing this block of comments:

Plugin Name: 
Version: 1.1.0
Author URI:
Plugin URI:

If you don’t do this, won’t get aware of the new version.
While editing the readme.txt, you should also add a little description about the new version. If you don’t have a Changelog section in the readme, you should add one.

== Changelog ==
= 1.1.0 =
A description about the new version.

= 1.0.0 = 
The first version.

This will appear as the Changelog tab on the page for the plugin on
Next, add a section for the little messages that are shown when the user gets notified about a new version.

== Upgrade Notice ==
= 1.1.0 =
Bugfixes and improvements.

Okey, now it’s time to upload the new version. Copy all the plugin files to this newly created folder. Run svn stat, which is the svn counterpart to git status. The new folder and files will be listed along the updated files in /trunk.

$ svn stat
? tags/1.1.0
# ...

Add the new files to svn.

$ svn add tags/1.1.0
# All new files will be listed

Commit and push the new version of your plugin to

$ svn ci -m 'tagging version 1.5.0'