Index: src/wp-admin/includes/schema.php
===================================================================
--- src/wp-admin/includes/schema.php	(revision 30993)
+++ src/wp-admin/includes/schema.php	(working copy)
@@ -397,7 +397,7 @@
 	'links_updated_date_format' => __('F j, Y g:i a'),
 	'comment_moderation' => 0,
 	'moderation_notify' => 1,
-	'permalink_structure' => '',
+	'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%/',
 	'gzipcompression' => 0,
 	'hack_file' => 0,
 	'blog_charset' => 'UTF-8',
@@ -495,7 +495,6 @@
 	if ( is_multisite() ) {
 		/* translators: blog tagline */
 		$options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_current_site()->site_name );
-		$options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/';
 	}
 
 	// Set autoload to no for these options
Index: src/wp-admin/includes/upgrade.php
===================================================================
--- src/wp-admin/includes/upgrade.php	(revision 30993)
+++ src/wp-admin/includes/upgrade.php	(working copy)
@@ -241,6 +241,15 @@
 	elseif ( ! is_super_admin( $user_id ) && ! metadata_exists( 'user', $user_id, 'show_welcome_panel' ) )
 		update_user_meta( $user_id, 'show_welcome_panel', 2 );
 
+	if ( ! is_multisite() ) {
+		// Verify pretty permalinks work, falling back to ugly permalinks if they don't.
+		$pretty_permalinks_work = wp_install_verify_permalink_structure();
+		if ( ! $pretty_permalinks_work ) {
+			$wp_rewrite->set_permalink_structure('');
+			$wp_rewrite->flush_rules();
+		}
+	}
+
 	if ( is_multisite() ) {
 		// Flush rules to pick up the new page.
 		$wp_rewrite->init();
@@ -260,6 +269,30 @@
 }
 endif;
 
+/**
+ * Verify whether the default pretty permalink structure works.
+ *
+ * @since 4.1.0
+ *
+ * @return bool
+ */
+function wp_install_verify_permalink_structure() {
+	global $wp_rewrite;
+	// Flush rules with the hard option to force refresh of the web-server's
+	// rewrite config file (e.g. .htaccess or web.config).
+	$wp_rewrite->flush_rules( true );
+
+	// Send a HEAD request to the dummy post made in wp_install_defaults()
+	// to smoke test pretty permalinks.
+	$link = get_permalink(1);
+	$response = wp_remote_head( $link );
+
+	$good_response = is_array( $response ) && isset( $response['response'], $response['response']['code'] )
+		&& $response['response']['code'] == 200;
+
+	return $good_response;
+}
+
 if ( !function_exists('wp_new_blog_notification') ) :
 /**
  * {@internal Missing Short Description}}
