How to Make Updates to your WordPress Plugin

Uploading a plugin to WordPress requires Subversion

So you’ve created your WordPress plugin and you’ve uploaded version 1.0 to the WordPress directory. You could just leave it and let it sit in the directory and hope that it stays compliant with future versions of WordPress and forget adding any other functionality to it. But chances are that you want to develop it and keep it in working order. Which means that you’ll want to create new versions.

To do this, open up your Subversion client and log in to your plugin repository. Go to the tags folder, where you should have a folder called 1.0. Right click on select “Duplicate Folder” (or other similar option). It’ll ask you for a name for your new folder and this will depend on how major the updates you’re making are:

Version numbering isn’t precise, but in general, the first number is used for major releases and upgrades. There have only been three major versions of WordPress in the last eight years for example (currently on v3). The second number is used for sizable, but not massive updates. This typically sees new functionality on a smaller scale. The third number tends to be left to bug fixes and minor updates. Since WordPress 3.1 was released, there have been three minor updates: 3.1.1, 3.1.2 and 3.1.3.

Once you’ve decided what your next version will be, name the new folder and check out a working copy to your local computer. Now you can open up the files from your computer and edit them all at will. Once you’ve made all your edits, your subversion client should show which files have changed since they were checked out. Click on Commit to send all the changes to the repository. You may be asked to write a note on what changed – you should make good use of this, as it will help you keep track on when things changes so that you (and other developers) can revert to older version easily by looking at the revision history.

Once you’ve updated it, you should do some testing, preferably on a local WordPress environment if you have one, rather than on a live website. If you’ve tested it, made any needed changes and you’re happy to release it to the public as your next version, update your readme file in your newest version by adding to the changelog, adding an upgrade description and change the Stable Tag to your current version. Commit those changes to the repository. Then copy that readme file to the trunk folder, overwriting the old readme file. Remember, it’s this readme file that will dictate which version the WordPress directory will display.

Within fifteen minutes, WordPress should check your readme file and note that you’ve got a newer stable tag and update the directory accordingly.

Have you been developing your plugin? Have you got a better method of doing your updates?

4 thoughts on “How to Make Updates to your WordPress Plugin”

  1. Jasmine says:

    No, I don’t have a better method of doing updates. I have not done any workable plugin yet, haha! Wait till next time. :)

  2. Ar says:

    Thanks for explanation, there is way to do updates from your own server, not from wordpress ?

    1. Well, of course, you aren’t required to use the WordPress repository to host your plugins, so you could always use your own solution. By far the best and easiest solution I have seen to it for delivering automatic updates to WordPress plugins not stored in the WordPress repository is by using Easy Digital Downloads:

  3. thupten1234 says:

    this article is missing how to update the plugin. You discussed about changing version and changing readme, but skipped the update process with ‘once you have updated your plugin’…I wish you describe the update process. There are several tutorials on creating plugins but its hard to find how to update a plugin. From what I have read, plugin’s that uses db, should save an option for plugin version. Then in install script one should check if current installed option version is less than the new version or nothing. If so, make changes to your database and resources as needed by the new version.

Leave a Reply