diff --git a/src/wp-admin/includes/export.php b/src/wp-admin/includes/export.php
index 277231ad52ea6..fbc5503a2c953 100644
--- a/src/wp-admin/includes/export.php
+++ b/src/wp-admin/includes/export.php
@@ -406,19 +406,25 @@ function wxr_authors_list( ?array $post_ids = null ) {
 
 		if ( ! empty( $post_ids ) ) {
 			$post_ids = array_map( 'absint', $post_ids );
-			$and      = 'AND ID IN ( ' . implode( ', ', $post_ids ) . ')';
+			$chunks   = array_chunk( $post_ids, 20 );
 		} else {
-			$and = '';
+			$chunks = array( array() );
 		}
 
 		$authors = array();
-		$results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft' $and" );
-		foreach ( (array) $results as $result ) {
-			$authors[] = get_userdata( $result->post_author );
+
+		foreach ( $chunks as $chunk ) {
+			$and = ! empty( $chunk ) ? 'AND ID IN (' . implode( ', ', $chunk ) . ')' : '';
+
+			$results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft' $and" );
+
+			foreach ( (array) $results as $result ) {
+				$authors[] = get_userdata( $result->post_author );
+			}
 		}
 
 		$authors = array_filter( $authors );
-
+		$authors = array_unique( $authors, SORT_REGULAR ); // Remove duplicate authors
 		foreach ( $authors as $author ) {
 			echo "\t<wp:author>";
 			echo '<wp:author_id>' . (int) $author->ID . '</wp:author_id>';
