Hi,
Wordpress's upgrade docs say you should disable all plugins when doing an upgrade, and then reactivate them one at a time to see if any break the new version of Wordpress. We can automate the disable bit, but not the reactivate-one-at-a-time bit.
But I can see how that could be a problem for you.
It will be possible to automate it, just so long as you're aware that it will probably break some installs, when an old plugin is enabled on a version of Wordpress that doesn't support it.
One method, if you know how to enable plugins with phpMyAdmin (I don't, I only know how to disable them that way) would be to use an installer customization like:
- Code: Select all
<?php
class i_installer_customcode
{
function init()
{
$this->registerCustomCode("wordpress", "all", "upgrade", "last", "process", "wordpressupgrade");
}
function wordpressupgrade($o)
{
$tables = $o->db_tables(); if (in_array($o->db_prefix."options",$tables)) {$o->db_query("UPDATE {$o->db_prefix}options SET option_value='...SOMETHINGHERE...' WHERE option_name='active_plugins' LIMIT 1;");}
}
}
?>
Where
...SOMETHINGHERE... is the value needed to enable the plugins. You would need to experiment with some Wordpress plugins, turning them on and off, to see if there's a usable pattern to the value used there. Installatron sets it to
a:0:{} to disable all the plugins.
And that customization would be run at the end of any upgrade.
Alternatively, I could tweak the upgrader to only disable the plugins if a certain file doesn't exist in the install location. You could create the file in any Wordpress install that you didn't want the plugins disabled on, or use a
wordpressinstall($o) customization to have Installatron automatically create that file any time someone installs Wordpress on your system.
I can show you how to set up the latter one if you want to go that way, but if Wordpress
needs the plugins to be disabled before running its core upgrade script, then this latter approach will screw up the upgrades. The first approach would be better if there's a way to make that work.
Rowan.