diff --git src/wp-includes/post.php src/wp-includes/post.php
index ae688a3470..1d2eceb00b 100644
--- src/wp-includes/post.php
+++ src/wp-includes/post.php
@@ -3419,6 +3419,7 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
  * @since 1.0.0
  * @since 4.2.0 Support was added for encoding emoji in the post title, content, and excerpt.
  * @since 4.4.0 A 'meta_input' array can now be passed to `$postarr` to add post meta data.
+ * @since 5.3.0 Post excerpt with only whitespaces is no longer being saved.
  *
  * @see sanitize_post()
  * @global wpdb $wpdb WordPress database abstraction object.
@@ -3526,6 +3527,16 @@ function wp_insert_post( $postarr, $wp_error = false ) {
 
 	$post_title   = $postarr['post_title'];
 	$post_content = $postarr['post_content'];
+
+	/**
+	 * Prevent `post_excerpt` from saving only whitespaces.
+	 * 
+	 * @link https://core.trac.wordpress.org/ticket/47849
+	 */
+	if ( empty( trim( $postarr['post_excerpt'] ) ) ) {
+		$postarr['post_excerpt'] = '';
+	}
+
 	$post_excerpt = $postarr['post_excerpt'];
 	if ( isset( $postarr['post_name'] ) ) {
 		$post_name = $postarr['post_name'];
diff --git tests/phpunit/tests/post.php tests/phpunit/tests/post.php
index 6ef0c8449f..0901dac519 100644
--- tests/phpunit/tests/post.php
+++ tests/phpunit/tests/post.php
@@ -1394,4 +1394,31 @@ class Tests_Post extends WP_UnitTestCase {
 	function filter_pre_wp_unique_post_slug( $default, $slug, $post_ID, $post_status, $post_type, $post_parent ) {
 		return 'override-slug-' . $post_type;
 	}
+
+	/**
+	 * @ticket 47849
+	 */
+	function test_do_not_save_only_whitespaces_on_post_excerpt() {
+		$create_post_with_proper_excerpt = self::factory()->post->create( array(
+			'post_title'    => 'Test post 1',
+			'post_content' => 'Test post content 1',
+			'post_excerpt' => ' Test post excerpt 1 '
+		) );
+
+		$get_post_with_proper_excerpt = get_post( $create_post_with_proper_excerpt );
+
+		$this->assertSame( ' Test post excerpt 1 ', $get_post_with_proper_excerpt->post_excerpt );
+
+		$create_post_with_whitespaces_excerpt = self::factory()->post->create( array(
+			'post_title'    => 'Test post 1',
+			'post_content' => 'Test post content 1',
+			'post_excerpt' => '        '
+		) );
+
+		$get_post_with_whitespaces_excerpt = get_post( $create_post_with_whitespaces_excerpt );
+
+		$this->assertSame( '', $get_post_with_whitespaces_excerpt->post_excerpt );
+
+	}
+
 }
