Index: src/wp-admin/includes/update-core.php
===================================================================
--- src/wp-admin/includes/update-core.php	(revision 35735)
+++ src/wp-admin/includes/update-core.php	(working copy)
@@ -703,47 +703,55 @@ $_old_files = array(
 );
 
 /**
  * Stores new files in wp-content to copy
  *
  * The contents of this array indicate any new bundled plugins/themes which
  * should be installed with the WordPress Upgrade. These items will not be
  * re-installed in future upgrades, this behaviour is controlled by the
  * introduced version present here being older than the current installed version.
  *
  * The content of this array should follow the following format:
  * Filename (relative to wp-content) => Introduced version
  * Directories should be noted by suffixing it with a trailing slash (/)
  *
  * @since 3.2.0
+ * @since 4.4.0 New themes are not automatically installed on upgrade.
+ *              This can still be explicitly asked for by defining
+ *              CORE_UPGRADE_SKIP_NEW_BUNDLED as false.
  * @global array $_new_bundled_files
  * @var array
  * @name $_new_bundled_files
  */
 global $_new_bundled_files;
 
 $_new_bundled_files = array(
 	'plugins/akismet/'       => '2.0',
 	'themes/twentyten/'      => '3.0',
 	'themes/twentyeleven/'   => '3.2',
 	'themes/twentytwelve/'   => '3.5',
 	'themes/twentythirteen/' => '3.6',
 	'themes/twentyfourteen/' => '3.8',
 	'themes/twentyfifteen/'  => '4.1',
 	'themes/twentysixteen/'  => '4.4',
 );
 
+// If not explicitly defined as false, don't install new default themes.
+if ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || CORE_UPGRADE_SKIP_NEW_BUNDLED ) {
+	$_new_bundled_files = array( 'plugins/akismet/' => '2.0' );
+}
+
 /**
  * Upgrade the core of WordPress.
  *
  * This will create a .maintenance file at the base of the WordPress directory
  * to ensure that people can not access the web site, when the files are being
  * copied to their locations.
  *
  * The files in the {@link $_old_files} list will be removed and the new files
  * copied from the zip file after the database is upgraded.
  *
  * The files in the {@link $_new_bundled_files} list will be added to the installation
  * if the version is greater than or equal to the old version being upgraded.
  *
  * The steps for the upgrader for after the new release is downloaded and
  * unzipped is:
Index: src/wp-admin/includes/schema.php
===================================================================
--- src/wp-admin/includes/schema.php	(revision 35735)
+++ src/wp-admin/includes/schema.php	(working copy)
@@ -356,35 +356,42 @@ function populate_options() {
 	$guessurl = wp_guess_url();
 	/**
 	 * Fires before creating WordPress options and populating their default values.
 	 *
 	 * @since 2.6.0
 	 */
 	do_action( 'populate_options' );
 
 	if ( ini_get('safe_mode') ) {
 		// Safe mode can break mkdir() so use a flat structure by default.
 		$uploads_use_yearmonth_folders = 0;
 	} else {
 		$uploads_use_yearmonth_folders = 1;
 	}
 
-	$template = WP_DEFAULT_THEME;
-	// If default theme is a child theme, we need to get its template
-	$theme = wp_get_theme( $template );
-	if ( ! $theme->errors() )
-		$template = $theme->get_template();
+	// If WP_DEFAULT_THEME doesn't exist, fall back to the latest core default theme.
+	$stylesheet = $template = WP_DEFAULT_THEME;
+	$theme = wp_get_theme( WP_DEFAULT_THEME );
+	if ( ! $theme->exists() ) {
+		$theme = WP_Theme::get_core_default_theme();
+	}
+
+	// If we can't find a core default theme, WP_DEFAULT_THEME is the best we can do.
+	if ( $theme ) {
+		$stylesheet = $theme->get_stylesheet();
+		$template   = $theme->get_template();
+	}
 
 	$timezone_string = '';
 	$gmt_offset = 0;
 	/* translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14)
 	   or a valid timezone string (America/New_York). See http://us3.php.net/manual/en/timezones.php
 	   for all timezone strings supported by PHP.
 	*/
 	$offset_or_tz = _x( '0', 'default GMT offset or timezone string' );
 	if ( is_numeric( $offset_or_tz ) )
 		$gmt_offset = $offset_or_tz;
 	elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list() ) )
 			$timezone_string = $offset_or_tz;
 
 	$options = array(
 	'siteurl' => $guessurl,
@@ -421,31 +428,31 @@ function populate_options() {
 	'moderation_notify' => 1,
 	'permalink_structure' => '',
 	'hack_file' => 0,
 	'blog_charset' => 'UTF-8',
 	'moderation_keys' => '',
 	'active_plugins' => array(),
 	'category_base' => '',
 	'ping_sites' => 'http://rpc.pingomatic.com/',
 	'comment_max_links' => 2,
 	'gmt_offset' => $gmt_offset,
 
 	// 1.5
 	'default_email_category' => 1,
 	'recently_edited' => '',
 	'template' => $template,
-	'stylesheet' => WP_DEFAULT_THEME,
+	'stylesheet' => $stylesheet,
 	'comment_whitelist' => 1,
 	'blacklist_keys' => '',
 	'comment_registration' => 0,
 	'html_type' => 'text/html',
 
 	// 1.5.1
 	'use_trackback' => 0,
 
 	// 2.0
 	'default_role' => 'subscriber',
 	'db_version' => $wp_db_version,
 
 	// 2.0.1
 	'uploads_use_yearmonth_folders' => $uploads_use_yearmonth_folders,
 	'upload_path' => '',
@@ -902,34 +909,45 @@ function populate_network( $network_id =
 		$errors->add( 'invalid_email', __( 'You must provide a valid email address.' ) );
 
 	if ( $errors->get_error_code() )
 		return $errors;
 
 	// If a user with the provided email does not exist, default to the current user as the new network admin.
 	$site_user = get_user_by( 'email', $email );
 	if ( false === $site_user ) {
 		$site_user = wp_get_current_user();
 	}
 
 	// Set up site tables.
 	$template = get_option( 'template' );
 	$stylesheet = get_option( 'stylesheet' );
 	$allowed_themes = array( $stylesheet => true );
-	if ( $template != $stylesheet )
+
+	if ( $template != $stylesheet ) {
 		$allowed_themes[ $template ] = true;
-	if ( WP_DEFAULT_THEME != $stylesheet && WP_DEFAULT_THEME != $template )
+	}
+
+	if ( WP_DEFAULT_THEME != $stylesheet && WP_DEFAULT_THEME != $template ) {
 		$allowed_themes[ WP_DEFAULT_THEME ] = true;
+	}
+
+	// If WP_DEFAULT_THEME doesn't exist, also whitelist the latest core default theme.
+	if ( ! wp_get_theme( WP_DEFAULT_THEME )->exists() ) {
+		if ( $core_default = WP_Theme::get_core_default_theme() ) {
+			$allowed_themes[ $core_default->get_stylesheet() ] = true;
+		}
+	}
 
 	if ( 1 == $network_id ) {
 		$wpdb->insert( $wpdb->site, array( 'domain' => $domain, 'path' => $path ) );
 		$network_id = $wpdb->insert_id;
 	} else {
 		$wpdb->insert( $wpdb->site, array( 'domain' => $domain, 'path' => $path, 'id' => $network_id ) );
 	}
 
 	wp_cache_delete( 'networks_have_paths', 'site-options' );
 
 	if ( !is_multisite() ) {
 		$site_admins = array( $site_user->user_login );
 		$users = get_users( array( 'fields' => array( 'ID', 'user_login' ) ) );
 		if ( $users ) {
 			foreach ( $users as $user ) {
Index: src/wp-includes/class-wp-theme.php
===================================================================
--- src/wp-includes/class-wp-theme.php	(revision 35735)
+++ src/wp-includes/class-wp-theme.php	(working copy)
@@ -44,30 +44,31 @@ final class WP_Theme implements ArrayAcc
 	 * Default themes.
 	 *
 	 * @static
 	 * @access private
 	 * @var array
 	 */
 	private static $default_themes = array(
 		'classic'        => 'WordPress Classic',
 		'default'        => 'WordPress Default',
 		'twentyten'      => 'Twenty Ten',
 		'twentyeleven'   => 'Twenty Eleven',
 		'twentytwelve'   => 'Twenty Twelve',
 		'twentythirteen' => 'Twenty Thirteen',
 		'twentyfourteen' => 'Twenty Fourteen',
 		'twentyfifteen'  => 'Twenty Fifteen',
+		'twentysixteen'  => 'Twenty Sixteen',
 	);
 
 	/**
 	 * Renamed theme tags.
 	 *
 	 * @static
 	 * @access private
 	 * @var array
 	 */
 	private static $tag_map = array(
 		'fixed-width'    => 'fixed-layout',
 		'flexible-width' => 'fluid-layout',
 	);
 
 	/**
@@ -1139,30 +1140,47 @@ final class WP_Theme implements ArrayAcc
 			$allowed = self::get_allowed_on_network();
 			if ( ! empty( $allowed[ $this->get_stylesheet() ] ) )
 				return true;
 		}
 
 		if ( 'both' == $check || 'site' == $check ) {
 			$allowed = self::get_allowed_on_site( $blog_id );
 			if ( ! empty( $allowed[ $this->get_stylesheet() ] ) )
 				return true;
 		}
 
 		return false;
 	}
 
 	/**
+	 * Determines the latest WordPress default theme that is installed.
+	 *
+	 * This hits the filesystem.
+	 *
+	 * @return WP_Theme|false Object, or false if no theme is installed, which would be bad.
+	 */
+	public static function get_core_default_theme() {
+		foreach ( array_reverse( self::$default_themes ) as $slug => $name ) {
+			$theme = wp_get_theme( $slug );
+			if ( $theme->exists() ) {
+				return $theme;
+			}
+		}
+		return false;
+	}
+
+	/**
 	 * Returns array of stylesheet names of themes allowed on the site or network.
 	 *
 	 * @since 3.4.0
 	 *
 	 * @static
 	 * @access public
 	 *
 	 * @param int $blog_id Optional. Defaults to current blog.
 	 * @return array Array of stylesheet names.
 	 */
 	public static function get_allowed( $blog_id = null ) {
 		/**
 		 * Filter the array of themes allowed on the site or network.
 		 *
 		 * @since MU
Index: src/wp-includes/default-constants.php
===================================================================
--- src/wp-includes/default-constants.php	(revision 35735)
+++ src/wp-includes/default-constants.php	(working copy)
@@ -336,22 +336,24 @@ function wp_templating_constants() {
 	/**
 	 * Filesystem path to the current active template directory
 	 * @since 1.5.0
 	 */
 	define('TEMPLATEPATH', get_template_directory());
 
 	/**
 	 * Filesystem path to the current active template stylesheet directory
 	 * @since 2.1.0
 	 */
 	define('STYLESHEETPATH', get_stylesheet_directory());
 
 	/**
 	 * Slug of the default theme for this install.
 	 * Used as the default theme when installing new sites.
-	 * Will be used as the fallback if the current theme doesn't exist.
+	 * It will be used as the fallback if the current theme doesn't exist.
+	 *
 	 * @since 3.0.0
+	 * @see WP_Theme::get_core_default_theme()
 	 */
 	if ( !defined('WP_DEFAULT_THEME') )
-		define( 'WP_DEFAULT_THEME', 'twentyfifteen' );
+		define( 'WP_DEFAULT_THEME', 'twentysixteen' );
 
 }
Index: src/wp-includes/theme.php
===================================================================
--- src/wp-includes/theme.php	(revision 35735)
+++ src/wp-includes/theme.php	(working copy)
@@ -741,67 +741,86 @@ function switch_theme( $stylesheet ) {
 	update_option( 'theme_switched', $old_theme->get_stylesheet() );
 	/**
 	 * Fires after the theme is switched.
 	 *
 	 * @since 1.5.0
 	 *
 	 * @param string   $new_name  Name of the new theme.
 	 * @param WP_Theme $new_theme WP_Theme instance of the new theme.
 	 */
 	do_action( 'switch_theme', $new_name, $new_theme );
 }
 
 /**
  * Checks that current theme files 'index.php' and 'style.css' exists.
  *
- * Does not check the default theme, which is the fallback and should always exist.
+ * Does not initially check the default theme, which is the fallback and should always exist.
+ * But if it doesn't exist, it'll fall back to the latest core default theme that does exist.
  * Will switch theme to the fallback theme if current theme does not validate.
+ *
  * You can use the 'validate_current_theme' filter to return false to
  * disable this functionality.
  *
  * @since 1.5.0
  * @see WP_DEFAULT_THEME
  *
  * @return bool
  */
 function validate_current_theme() {
 	/**
 	 * Filter whether to validate the current theme.
 	 *
 	 * @since 2.7.0
 	 *
 	 * @param bool true Validation flag to check the current theme.
 	 */
 	if ( wp_installing() || ! apply_filters( 'validate_current_theme', true ) )
 		return true;
 
-	if ( get_template() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/index.php') ) {
-		switch_theme( WP_DEFAULT_THEME );
-		return false;
+	if ( ! file_exists( get_template_directory() . '/index.php' ) ) {
+		// Invalid.
+	} elseif ( ! file_exists( get_template_directory() . '/style.css' ) ) {
+		// Invalid.
+	} elseif ( is_child_theme() && ! file_exists( get_stylesheet_directory() . '/style.css' ) ) {
+		// Invalid.
+	} else {
+		// Valid.
+		return true;
 	}
 
-	if ( get_stylesheet() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/style.css') ) {
+	$default = wp_get_theme( WP_DEFAULT_THEME );
+	if ( $default->exists() ) {
 		switch_theme( WP_DEFAULT_THEME );
 		return false;
 	}
 
-	if ( is_child_theme() && ! file_exists( get_stylesheet_directory() . '/style.css' ) ) {
-		switch_theme( WP_DEFAULT_THEME );
-		return false;
+	/**
+	 * If we're in an invalid state but WP_DEFAULT_THEME doesn't exist,
+	 * switch to the latest core default theme that's installed.
+	 * If it turns out that this latest core default theme is our current
+	 * theme, then there's nothing we can do about that, so we have to bail,
+	 * rather than going into an infinite loop. (This is why there are
+	 * checks against WP_DEFAULT_THEME above, also.) We also can't do anything
+	 * if it turns out there is no default theme installed. (That's `false`.)
+	 */
+	$default = WP_Theme::get_core_default_theme();
+	if ( false === $default || get_stylesheet() == $default->get_stylesheet() ) {
+		return true;
 	}
 
-	return true;
+	switch_theme( $default->get_stylesheet() );
+	return false;
 }
 
 /**
  * Retrieve all theme modifications.
  *
  * @since 3.1.0
  *
  * @return array|void Theme modifications.
  */
 function get_theme_mods() {
 	$theme_slug = get_option( 'stylesheet' );
 	$mods = get_option( "theme_mods_$theme_slug" );
 	if ( false === $mods ) {
 		$theme_name = get_option( 'current_theme' );
 		if ( false === $theme_name )
Index: tests/phpunit/tests/theme.php
===================================================================
--- tests/phpunit/tests/theme.php	(revision 35735)
+++ tests/phpunit/tests/theme.php	(working copy)
@@ -164,30 +164,31 @@ class Tests_Theme extends WP_UnitTestCas
 
 		$this->assertEquals('publish', $theme->get( 'Status' ) );
 
 		$this->assertEquals( WP_CONTENT_DIR . '/themes/' . $this->theme_slug, $theme->get_stylesheet_directory(), 'get_stylesheet_directory' );
 		$this->assertEquals( WP_CONTENT_DIR . '/themes/' . $this->theme_slug, $theme->get_template_directory(), 'get_template_directory' );
 		$this->assertEquals( content_url( 'themes/' . $this->theme_slug ), $theme->get_stylesheet_directory_uri(), 'get_stylesheet_directory_uri' );
 		$this->assertEquals( content_url( 'themes/' . $this->theme_slug ), $theme->get_template_directory_uri(), 'get_template_directory_uri' );
 	}
 
 	/**
 	 * Make sure we update the default theme list to include the latest default theme.
 	 *
 	 * @ticket 29925
 	 */
 	function test_default_theme_in_default_theme_list() {
+		$this->markTestSkipped( 'Core repository inclusion was stopped after Twenty Fifteen' );
 		if ( 'twenty' === substr( WP_DEFAULT_THEME, 0, 6 ) ) {
 			$this->assertContains( WP_DEFAULT_THEME, $this->default_themes );
 		}
 	}
 
 	function test_default_themes_have_textdomain() {
 		foreach ( $this->default_themes as $theme ) {
 			$this->assertEquals( $theme, wp_get_theme( $theme )->get( 'TextDomain' ) );
 		}
 	}
 
 	/**
 	 * @ticket 20897
 	 * @expectedDeprecated get_theme_data
 	 */
