diff --git a/wp-includes/class-wp-post-type.php b/wp-includes/class-wp-post-type.php
index ba37a02fb5..143fe0a899 100644
--- a/wp-includes/class-wp-post-type.php
+++ b/wp-includes/class-wp-post-type.php
@@ -398,7 +398,7 @@ final class WP_Post_Type {
 			'register_meta_box_cb'  => null,
 			'taxonomies'            => array(),
 			'has_archive'           => false,
-			'rewrite'               => true,
+			'rewrite'               => null,
 			'query_var'             => true,
 			'can_export'            => true,
 			'delete_with_user'      => null,
@@ -418,6 +418,11 @@ final class WP_Post_Type {
 			$args['publicly_queryable'] = $args['public'];
 		}
 
+		// If not set, default to the setting for publicly_queriable.
+		if ( null === $args['rewrite'] ) {
+			$args['rewrite'] = $args['publicly_queryable'];
+		}
+
 		// If not set, default to the setting for public.
 		if ( null === $args['show_ui'] ) {
 			$args['show_ui'] = $args['public'];
diff --git a/wp-includes/post.php b/wp-includes/post.php
index 7feb284e85..35e1237f67 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -1248,8 +1248,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  *                                              $rewrite is enabled. Default false.
  *     @type bool|array  $rewrite              {
  *         Triggers the handling of rewrites for this post type. To prevent rewrite, set to false.
- *         Defaults to true, using $post_type as slug. To specify rewrite rules, an array can be
- *         passed with any of these keys:
+ *         Defaults to value of $publicly_queryable, using $post_type as slug. To specify rewrite rules,
+ *         an array can be passed with any of these keys:
  *
  *         @type string $slug       Customize the permastruct slug. Defaults to $post_type key.
  *         @type bool   $with_front Whether the permastruct should be prepended with WP_Rewrite::$front.
