Index: wp-admin/includes/plugin.php =================================================================== --- wp-admin/includes/plugin.php (revision 21229) +++ wp-admin/includes/plugin.php (working copy) @@ -778,6 +778,24 @@ // invalid plugins get deactivated foreach ( $plugins as $plugin ) { + + // see if the plugin file name was changed + if ( ! file_exists( WP_PLUGIN_DIR . '/' . $plugin ) ) { + $plugin_dir = dirname( $plugin ); + if ( ! empty( $plugin_dir ) ) { + $renamed_plugin_data = get_plugins( '/' . $plugin_dir ); + if ( ! empty( $renamed_plugin_data ) ) { + $plugin_files = array_keys( $renamed_plugin_data ); + $renamed_plugin = $plugin_dir . '/' . $plugin_files[0]; + if ( ! is_wp_error( validate_plugin( $renamed_plugin ) ) ) { + deactivate_plugins( $plugin, true ); + activate_plugin( $renamed_plugin, '', false, true ); + continue; + } + } + } + } + $result = validate_plugin( $plugin ); if ( is_wp_error( $result ) ) { $invalid[$plugin] = $result; Index: wp-admin/plugins.php =================================================================== --- wp-admin/plugins.php (revision 21229) +++ wp-admin/plugins.php (working copy) @@ -316,6 +316,7 @@ } } +$invalid = validate_active_plugins(); $wp_list_table->prepare_items(); wp_enqueue_script('plugin-install'); @@ -349,7 +350,6 @@ require_once(ABSPATH . 'wp-admin/admin-header.php'); -$invalid = validate_active_plugins(); if ( !empty($invalid) ) foreach ( $invalid as $plugin_file => $error ) echo '
' . sprintf(__('The plugin %s
has been deactivated due to an error: %s'), esc_html($plugin_file), $error->get_error_message()) . '