When a plugin is being updated via the automatic updater, is that plugin deactivated and then re activated when the plugin update is finished?

Also is a maintenance file created during theme and plugin updates, or only during core updates?


According to the source code of wp-admin/includes/class-wp-upgrader.php

Single plugin update:

add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2);

add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);

It'll deactivate the plugin before upgrade and you need to re-activate it manually after upgrade.

No maintenance file generated

Bulk Pluigns Update

add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);

// Only start maintenance mode if running in Multisite OR the plugin is in use

No deactivation before upgrade. The plugin status will be as what it was. So, if it is activated now, it'll still be activated after upgrade.

And maintenance file will be generated if running in Multisite OR the plugin is in use.

I urge you to read the source code yourself in case if I'm wrong.

  • That's interesting, why are bulk treated differently than single?
    – urok93
    Mar 11 '13 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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