Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm developing a plugin (my first plugin), and I wonder how to think about [supporting and testing various plugin version and WordPress version combinations].

For example, if I develop a plugin, and release versions 1.0 and 1.1 and 2.0. Meanwhile, WordPress releases versions 3.2, 3.3 and 3.4.

Now, at the one extreme: Should I assume that people upgrade their WordPress installations, and upgrade the plugin as well? That is, I would test the most recent plugin version against the most recent WordPress version, only?

Or, at the other extreme: I assume that, for various reasons, people are not able to upgrade to the latest WordPress release. So I test plugin version 1.0, 1.1 and 2.0 against WordPress 3.2, 3.3 and 3.4. (That is, 9 combinations.)

What would be reasonable to do? (What do people usually do?)

(I'd be happy to provide more details — what would you need to know?)

share|improve this question
    
Here is a related question: Supporting older WordPress versions in a Plugin/Theme? –  KajMagnus Jun 22 '12 at 8:32

2 Answers 2

up vote 4 down vote accepted

Usually a plugin developed in WordPress version will run fine on several newer versions. What you need to care about is 'deprecated` features/apis in WordPress. Any API in WordPress is not removed overnight, rather it remains deprecated for several versions. You will get such a list here: http://codex.wordpress.org/Category:Deprecated_Functions

When you develop a plugin, you can see what are the specific api you are using on your plugin and which WP version introduced that API. That should be the minimum WordPress version your plugin require and you should mention it clearly on the readme.txt.

After development, you can test on several backwards and available forward releases. For example, when you are developing a plugin on WP 3.1, you can also check whether it works on versions below 3.1. Again, first check which you API you are using! You don't need to check WP in version 2.7 if a API is introduced in version 2.8 as it won't work (unless you plan other alternative). Then you can check any current stable releases greater than 3.1. If nothing available, you can check the alpha/beta/rc versions of the new WP. You can check their upcoming changes on roadmap.

When newer WP version is available, you should immediately check if the plugin is working as expected. If not, make a new version of your plugin and commit to repo. When people will see that your plugin is not working on new WP version, they are supposed to check if the updates are available. If you tag a new update of your plugin, it will notify users about the update on their plugins page.

I hope these info helps, at least a bit :-).

share|improve this answer
1  
Yes, thanks, I like this approach, it seems efficient and lightweight. I'll probably develop against 3.4 and then check some earlier versions — here is some stats on wordpress versions and installations that might be of interest when deciding which versions to test. –  KajMagnus Jun 22 '12 at 10:59

I don't think you need to worry about these things! WP Upgrades rarely change any function definitions, and if they do, WP_DEBUG = true will bring it to your notice.

Just develop with WP_DEBUG set to true, and if a function is deprecated after a WP upgrade, replace it with its newer equivalent and release your plugin with a newer version.

Well that's just how I'd go with it! ;)

share|improve this answer
    
Thanks. (I had almost forgotten the WP_DEBUG flag because I've installed another plugin that causes lots of errors when I enable that flag :-/ .) –  KajMagnus Jun 22 '12 at 11:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.