News & Info

Daily Updates and Tech Chatter

WordPress Plugin Repository Maintenance : Version Retention

WordPress Plugin Directory Banner

As a developer with several WordPress plugins hosted at the WordPress Plugin Directory, I often have questions on how I should be maintaining those repositories.   This past weekend I was having multiple problems with publishing an update to the Store Locator Plus plugin.   That plugin repository has been around for several years and has 102 versions as of this weekend.    When I cleared the repository directory and cloned from the server it crashed nearly every time.

If you are not aware of how Subversion works, one key element is that each tagged version and each branch includes a complete copy of the plugin.    Every time you publish a new version of your WordPress plugin you create a new directory under the tags subdirectory named for your current stable release.    If you have a version 0.1, 0.2, 0.3… 1.0 you can easily end up with 10 copies of your plugin, one full copy for each release of the product.

Sample of Older SLP Tags

Sample of Older SLP Tags

As you can imagine, when you get up to version 3.11.8 over the course of several years of development you can end up with a lot of copies of your plugin.  The images, the code, the CSS, the JavaScript.  It is all there.    It is kind of cool to be able to go into each tag directory and instantly re-create a specific version with everything you need in one folder.   It is also a big waste of disk space and bandwidth when you are on version 3.11.8 and nobody has used or even looked at version 0.9 in 28 months.

You can help reduce the disk space and bandwidth that your plugin consumes by cleaning up your old/obsolete versions.   After posing a question to the WordPress plugin team, I got a quick response back from Otto suggesting that I keep several recent versions as a point of reference for other developers but delete the older version that no longer serve a purpose.   That purpose includes general shared knowledge/examples for other developers.  In other words, keep some previous versions for people to learn from or revert to.  Remember, this is a shared community space and your needs/wants/desires should be balanced with what is good for the community at large.

I am assuming the WordPress servers can easily handle the disk space usage and probably the bandwidth.   However everyone that clones your repository gets all the obsolete “garbage”.  This consume their disk space and uses up  more of their bandwidth and the WordPress server bandwidth than is necessary.  Every time someone makes a copy of the repository this effect is multiplied.    In addition the scripts, whether interactive or general maintenance such as the WordPress server backup scripts, need to work harder as more and more cruft builds up in the repository.

So what is the bottom line answer?

Delete your old obsolete tag directories.  Only keep what you deem reasonable.   Keeping at least the last few versions intact seems to be prudent.

Hopefully this posts helps other plugin developers maintain their plugins with some input from the WordPress plugin team.

 

Tags: , ,

Comments are closed.