One of the recurring issues that seems to pop up for WordPress plugin developers as of late is the “Last Updated” problem. For those of you that don’t release your plugins on the WordPress plugin repository or haven’t noticed when downloading a plugin, there is a bit of information right below the download button called “Last Updated.”
Essentially, this date is an indicator of the last time a version of the plugin was released. A big issue for a lot of developers lately is when releasing a new version of their plugin, this date will not update and continue to use the previous version’s date.
Now, this isn’t really a huge deal because users who have a plugin installed will be notified when there is a new version through their site’s admin panel. However, what most plugin authors want, though, is to be listed in the Recently Updated section on WordPress.org. This equals exposure, which equals downloads and more active users.
To solve this problem is pretty simple, but something that isn’t clear because of the lack of communication from whomever controls the Plugin Repository.
With each plugin SVN, you should have three folders: branches, tags, and trunk. Typically, when uploading a new version of your plugin you will place everything into the trunk folder. In addition, you will also copy these files into a new folder under tags with the appropriate version number. The problem lies in how you actually commit your updates.
The Wrong Way
- Update your plugin and commit the changes to trunk
- Copy these files into a new folder under tags and commit
The reason this is wrong is because the “Last Updated” date reflects whatever is in the tags folder. If the new version’s tags folder does not exist when you update your trunk, it will not be able to find the most recent date. I can’t be sure on this part and it’s only a guess, but I think committing your tags folder at this point causes a bug in the SVN to never look for it.
The Right Way
- Update your plugin in the trunk folder
- Copy these files into a new folder under tags
- Commit ALL changes (trunk and tags) at once
This kind of commit should indicate to the SVN that there is a new version. From here, it will build the download, update the information (including the Last Updated date), and populate the Recently Updated section.
If there’s some SVN guru out there that can explain to me why it needs to happen this way, please do. All I know is that this needs to be the process a plugin developer must take if they want their work to be hosted on the Plugin Directory.
UPDATE: Otto officially responds on WordPress StackExchange with an answer. Basically, there is a problem and he’s been trying to fix it.