After publishing or updating a plugin on the WordPress Plugin Directory, the version number is either not displaying or is not updating.
In my case it was a new plugin, one I wrote using Notepad++.
The download button was showing ‘Download Version’ instead of ‘Download Version #’.
And the compatibility tool was showing the plugin’s current version as an empty option.
The advice below assumes you have an understanding of how to upload WordPress plugins to the SVN. If you do not, or are unsure about the process see How to upload a plugin to the WordPress SVN repository.
Note: if the version number has not changed since the last update the plugin directory will not recognise the update – you MUST change the version number if you want the plugin to be recompiled and the version number to display on the plugin directory. That is, if you have this problem at version 1.2 you need to change the version to 1.2.1 before the number is recognised.
The first thing you need to do is make sure your readme.txt file is located in the trunk directory and it has a valid header – you can use the WordPress readme.txt validator to check this.
The top of the readme should look something like this, most important the ‘Stable tag’ should be the correct number.
=== Gravity Forms - Infobox field === Contributors: ovann86 Donate link: http://www.itsupportguides.com/ Tags: gravity forms Requires at least: 4.1 Tested up to: 4.1 Stable tag: 1.2.1 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html Extends the Gravity Forms plugin - adding an infobox field that can be used to display information throughout the form.
Second, you need to ensure that your main PHP file has the the same version number at the start of the file. Note that in the PHP file you use ‘Version: 1.2.1’ For example
<?php /* Plugin Name: Gravity Forms - Infobox field Version: 1.2.1 Description: Extends the Gravity Forms plugin, adding an infobox field that can be used to display information throughout the form. Author: Adrian Gordon Author URI: http://www.itsupportguides.com License: GPL2 */
Now with both of these correct, you should be able to commit the changes to the WordPress SVN. Within 15 minutes the plugin directory should be displaying the updated version number.
If this hasn’t worked you may be having the issue I was experiencing – where the PHP file contained either the old Mac style new line format or a combination of Windows and Unix format new line codes – resulting in the system not being able to correctly read through the file and find the version number.
To check if this is your problem, open your plugin’s PHP file in Notepad++ then click on the ‘Edit’ menu and then ‘EOL Conversion’.
The option that is light grey is the one that your file is using – if none are light grey the file contains a combination.
Click on ‘Windows Format’ to change the end of line format and save the changes to the file.
Now update your plugin’s version number (you must do this so the number is pulled into the plugin directory) and commit the changes to the SVN.
After this you should find that the plugin directory is showing the version number correctly.
If it isn’t, email [email protected] (from the same email address that owns the plugin) – link them to your plugin on the directory and explain the issue you’re having.