Index: src/wp-admin/includes/plugin.php
===================================================================
--- src/wp-admin/includes/plugin.php	(revision 27236)
+++ src/wp-admin/includes/plugin.php	(working copy)
@@ -636,6 +636,20 @@
 			 *                                     or just the current site. Multisite only. Default is false.
 			 */
 			do_action( 'deactivate_plugin', $plugin, $network_deactivating );
+
+			/**
+			 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation
+			 * and when the $silent parameter is false.
+			 *
+			 * The action concatenates the 'deactivate_' prefix with the plugin's basename
+			 * to create a dynamically-named action.
+			 *
+			 * @since 2.0.0
+			 *
+			 * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
+			 *                                   or just the current site. Multisite only. Default is false.
+			 */
+			do_action( 'deactivate_' . $plugin, $network_deactivating );
 		}
 
 		if ( false !== $network_wide ) {
@@ -654,40 +668,26 @@
 				unset( $current[ $key ] );
 			}
 		}
-
-		if ( ! $silent ) {
-			/**
-			 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation
-			 * and when the $silent parameter is false.
-			 *
-			 * The action concatenates the 'deactivate_' prefix with the plugin's basename
-			 * to create a dynamically-named action.
-			 *
-			 * @since 2.0.0
-			 *
-			 * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
-			 *                                   or just the current site. Multisite only. Default is false.
-			 */
-			do_action( 'deactivate_' . $plugin, $network_deactivating );
-
-			/**
-			 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation
-			 * and when the $silent parameter is false.
-			 *
-			 * @since 2.9.0
-			 *
-			 * @param string $plugin               Plugin path to main plugin file with plugin data.
-			 * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network
-			 *                                     or just the current site. Multisite only. Default is false.
-			 */
-			do_action( 'deactivated_plugin', $plugin, $network_deactivating );
-		}
 	}
 
 	if ( $do_blog )
 		update_option('active_plugins', $current);
 	if ( $do_network )
 		update_site_option( 'active_sitewide_plugins', $network_current );
+
+	if ( ! $silent ) {
+		/**
+		 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation
+		 * and when the $silent parameter is false.
+		 *
+		 * @since 2.9.0
+		 *
+		 * @param string $plugin               Plugin path to main plugin file with plugin data.
+		 * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network
+		 *                                     or just the current site. Multisite only. Default is false.
+		 */
+		do_action( 'deactivated_plugin', $plugin, $network_deactivating );
+	}
 }
 
 /**
