diff --git a/wp-admin/includes/admin-filters.php b/wp-admin/includes/admin-filters.php
index 141e8aa..070056e 100644
--- a/wp-admin/includes/admin-filters.php
+++ b/wp-admin/includes/admin-filters.php
@@ -119,3 +119,4 @@ add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async
 add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
 add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
 add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
+add_filter( 'upgrader_pre_download', 'wp_opcache_reset', 10, 3 );
\ No newline at end of file
diff --git a/wp-includes/update.php b/wp-includes/update.php
index f0b999a..5c4afdb 100644
--- a/wp-includes/update.php
+++ b/wp-includes/update.php
@@ -706,6 +706,24 @@ function wp_clean_update_cache() {
 	delete_site_transient( 'update_core' );
 }
 
+/**
+ * Reset PHP opcache
+ *
+ * @since 4.8
+ *
+ * @return boolean
+ */
+function wp_opcache_reset($reply, $package, $wp_upgrader) {
+	if ( function_exists( 'opcache_reset' ) && ini_get('opcache.validate_timestamps') != '1' && (!ini_get('opcache.restrict_api') || stripos(ABSPATH, ini_get('opcache.restrict_api')) === 0) ) {
+		opcache_reset();
+		$opcache_status = opcache_get_status();
+		$matches = preg_grep( "/^" . preg_quote(ABSPATH, '/') . "/" , array_keys($opcache_status['scripts']) );
+		if(count($matches))
+			array_map('opcache_invalidate', $matches, array_fill(0, count($matches), TRUE));
+	}
+	return $reply;
+}
+
 if ( ( ! is_main_site() && ! is_network_admin() ) || wp_doing_ajax() ) {
 	return;
 }
