Whenever a major version of WordPress is released, WordPress.org will send a reminder to plugin authors to test their plugins with the latest version, and also to update the Tested up to value. This gives your plugin users some peace of mind that your plugin has been tested and works with the latest version of WordPress. To update this value, you don’t need to release a new version of your plugin, you can simply update the readme.txt file in your latest tagged version.
Since I don’t use SVN all that often, for the life of me, I can never remember how to do this so I’m constantly Googling for instructions. Every. Single. Time! Uugh!
So, to help me remember next time, and to hopefully help you too, here’s some step-by-step instructions on updating your readme.txt file in your .org plugin.
First change directory to the folder that contains your local copy of the repository and make sure it’s up to date using
$ cd my-local-plugin-folder my-local-plugin-folder/$ svn up > At revision 1683267.
In the above example, everything is up to date. If there had been changes in the central repository, they would have been downloaded and merged into your local copy.
Now you can edit the readme.txt file in the trunk folder using whatever editor you prefer. I’m currently using
Atom Sublime Text 3 VS Code.
After making your changes you can check and see what’s different between your local copy and the central repository by using
svn stat. After checking the status, it should tell you what files have been changed. In my example, I’ve modified the readme.txt file.
my-local-plugin-folder/$ svn stat > M trunk/readme.txt
Since we want to update the latest tagged revision, check the tags folder to see which version is the latest and then copy the readme.txt file into this folder.
my-local-plugin-folder/$ cp trunk/readme.txt tags/1.1
If we check the status of the local copy again we’ll now see that two files have been modified. The original file we changed in the trunk folder and the copy in the tags folder.
my-local-plugin-folder/$ svn stat > M tags/1.1/readme.txt > M trunk/readme.txt
To see exactly what’s changed, we can perform a diff using
svn diff. What gets displayed is the results from a standard diff, highlighting lines that have been added/deleted. In the example below, you can see that I changed the Tested up to value from 4.7 to 4.8.
my-local-plugin-folder/$ svn diff > Index: tags/1.1/readme.txt =================================================================== --- tags/1.1/readme.txt (revision 1683267) +++ tags/1.1/readme.txt (working copy) @@ -3,7 +3,7 @@ Requires at least: 4.5 -Tested up to: 4.7 +Tested up to: 4.8 Stable tag: 1.1 > Index: trunk/readme.txt =================================================================== --- trunk/readme.txt (revision 1683267) +++ trunk/readme.txt (working copy) @@ -3,7 +3,7 @@ Requires at least: 4.5 -Tested up to: 4.7 +Tested up to: 4.8 Stable tag: 1.1
If everything looks ok, then it’s time to check in those changes to the central repository using
svn ci. We can also pass along a suitable message by including
-m "Your Message here".
my-local-plugin-folder/$ svn ci -m "Updated Tested up to value to 4.8" > Sending tags/1.1/readme.txt > Sending trunk/readme.txt > Transmitting file data ..done > Committing transaction... > Committed revision 1683324.
Once your changes have been checked in, you should also receive an email from WordPress.org advising of your changes.
Easy peasy eh! 🙂