diff --git src/wp-includes/post.php src/wp-includes/post.php
index 306e567bb9..0867e04c60 100644
--- src/wp-includes/post.php
+++ src/wp-includes/post.php
@@ -5470,6 +5470,7 @@ function wp_insert_attachment( $args, $file = false, $parent = 0, $wp_error = fa
  * for media is disabled, item is already in the trash, or $force_delete is true.
  *
  * @since 2.0.0
+ * @since 5.3.0 Return `false` if `wp_delete_attachment_files()` failed.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
@@ -5545,8 +5546,11 @@ function wp_delete_attachment( $post_id, $force_delete = false ) {
 	}
 	/** This action is documented in wp-includes/post.php */
 	do_action( 'deleted_post', $post_id );
-
-	wp_delete_attachment_files( $post_id, $meta, $backup_sizes, $file );
+	
+	$delete_file = wp_delete_attachment_files( $post_id, $meta, $backup_sizes, $file );
+	if ( ! $delete_file ) {
+		return false;
+	}
 
 	clean_post_cache( $post );
 
diff --git tests/phpunit/tests/post/attachments.php tests/phpunit/tests/post/attachments.php
index 70255d5bec..8b422e3456 100644
--- tests/phpunit/tests/post/attachments.php
+++ tests/phpunit/tests/post/attachments.php
@@ -529,4 +529,31 @@ class Tests_Post_Attachments extends WP_UnitTestCase {
 
 		$this->assertContains( 'images/media/video.png', $icon );
 	}
+
+	/**
+	 * @ticket 47868
+	 */
+	function test_wp_delete_attachment_return_false_if_file_not_deleted() {
+		$filename = ( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG' );
+		$contents = file_get_contents( $filename );
+
+		$upload = wp_upload_bits( wp_basename( $filename ), null, $contents );
+		$this->assertTrue( empty( $upload['error'] ) );
+
+		$attachment_id = $this->_make_attachment( $upload );
+
+		// Corrupt the data by removing `_wp_attached_file` and `_wp_attachment_metadata` metas
+		// of the newly created attachment post.
+		delete_post_meta( $attachment_id, '_wp_attached_file' );
+		delete_post_meta( $attachment_id, '_wp_attachment_metadata' );
+
+		$delete_attachment = wp_delete_attachment( $attachment_id );
+
+		// Since the metas are corrupted, the file wouldn't be deleted.
+		$this->assertTrue( file_exists( $filename ) );
+
+		// And since no file was deleted, `wp_delete_attachment()` should return false.
+		$this->assertFalse( $delete_attachment );
+	}
+
 }
diff --git tests/phpunit/tests/rest-api/rest-attachments-controller.php tests/phpunit/tests/rest-api/rest-attachments-controller.php
index 556cc6c8be..80a10cfe6a 100644
--- tests/phpunit/tests/rest-api/rest-attachments-controller.php
+++ tests/phpunit/tests/rest-api/rest-attachments-controller.php
@@ -1222,14 +1222,14 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control
 
 	public function test_delete_item() {
 		wp_set_current_user( self::$editor_id );
-		$attachment_id    = $this->factory->attachment->create_object(
-			$this->test_file,
-			0,
-			array(
-				'post_mime_type' => 'image/jpeg',
-				'post_excerpt'   => 'A sample caption',
-			)
-		);
+
+		$contents = file_get_contents( $this->test_file );
+		$upload = wp_upload_bits( wp_basename( $this->test_file ), null, $contents );
+		
+		$this->assertTrue( empty( $upload['error'] ) );
+
+		$attachment_id = $this->_make_attachment( $upload );
+
 		$request          = new WP_REST_Request( 'DELETE', '/wp/v2/media/' . $attachment_id );
 		$request['force'] = true;
 		$response         = rest_get_server()->dispatch( $request );
