WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Last week I had released a version of a WordPress plugin that works if the user was doing a fresh install, however if they already had the plugin and upgraded it using the WordPress upgrade automatically feature, problems occurred and some of the database elements were erased. So I had to revert back immediately.

I was wondering if there was a way to test the plugin through the upgrade automatically functionality before hand instead of having to release it and hoping you get it right the first time.

Thanks in advance,


share|improve this question

If I am not mistaken upgrade process is essentially:

  1. Deactivating plugin.
  2. Replacing files with newer version.
  3. Re-activating plugin.

Had you treid to simply reproduce this sequence manually?

share|improve this answer
Not always, you can also just replace the files on the server, and then you don't have steps 1 and 3. In fact, because this was inconsistent, the register_activation_hook doesn't fire in 3.1 anymore when you do an upgrade. But it did in previous versions, and perhaps Omar's plugin always set the database to a clean version on activation? – Jan Fabry Feb 8 '11 at 9:16
@Jan Fabry Not always what? I think (de)activation is always part of automatic upgrade process (which question is about). Of course it also makes sense to test manual update, but that is out of scope of this question (as I understand it). – Rarst Feb 8 '11 at 9:30
Ok, so maybe step 1 will still fire, but after WP 3.1 step 3 will certainly not fire anymore (when looking from a hook perspective). – Jan Fabry Feb 8 '11 at 9:42

I think the most straight forward route is to have a demo site that you use over to one side (Consider it a QA environment). Just open that site up and trigger the download/update on this site once you commit your changes to SVN.

share|improve this answer

Your Answer


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