diff --git a/wp-admin/includes/class-file-upload-upgrader.php b/wp-admin/includes/class-file-upload-upgrader.php
index 1201c6d188..48e1aac721 100644
--- a/wp-admin/includes/class-file-upload-upgrader.php
+++ b/wp-admin/includes/class-file-upload-upgrader.php
@@ -72,7 +72,24 @@ class File_Upload_Upgrader {
if ( 'pluginzip' === $form || 'themezip' === $form ) {
if ( ! wp_zip_file_is_valid( $file['file'] ) ) {
wp_delete_file( $file['file'] );
- wp_die( __( 'Incompatible Archive.' ) );
+
+ if ( 'pluginzip' === $form ) {
+ $plugins_page = sprintf(
+ '%s',
+ self_admin_url( 'plugin-install.php' ),
+ __( 'Return to the Plugin Installer' )
+ );
+ wp_die( __( 'Incompatible Archive.' ) . '
' . $plugins_page );
+ }
+
+ if ( 'themezip' === $form ) {
+ $themes_page = sprintf(
+ '%s',
+ self_admin_url( 'theme-install.php' ),
+ __( 'Return to the Theme Installer' )
+ );
+ wp_die( __( 'Incompatible Archive.' ) . '
' . $themes_page );
+ }
}
}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 07af091d2a..818650669a 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.6-alpha-57785';
+$wp_version = '6.6-alpha-57786';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.