diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 4535684..935c12f 100644
--- a/src/wp-admin/includes/file.php
+++ b/src/wp-admin/includes/file.php
@@ -2031,13 +2031,14 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
 	}
 
 	// Protect export folder from browsing.
-	$index_pathname = $exports_dir . 'index.html';
+	$index_pathname = $exports_dir . 'index.php';
 	if ( ! file_exists( $index_pathname ) ) {
 		$file = fopen( $index_pathname, 'w' );
 		if ( false === $file ) {
 			wp_send_json_error( __( 'Unable to protect export folder from browsing.' ) );
 		}
-		fwrite( $file, 'Silence is golden.' );
+		fwrite( $file, "<?php \n");
+		fwrite( $file, "// Silence is golden." );
 		fclose( $file );
 	}
 
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 60229ee..29c6c5d 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -6324,7 +6324,7 @@ function wp_privacy_delete_old_export_files() {
 	require_once( ABSPATH . 'wp-admin/includes/file.php' );
 
 	$exports_dir  = wp_privacy_exports_dir();
-	$export_files = list_files( $exports_dir, 100, array( 'index.html' ) );
+	$export_files = list_files( $exports_dir, 100, array( 'index.php' ) );
 
 	/**
 	 * Filters the lifetime, in seconds, of a personal data export file.
