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.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
That's interesting, why are bulk treated differently than single? –  drtanz Mar 11 '13 at 10:45

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.