--- a/wp/wp-admin/install.php Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-admin/install.php Fri Sep 05 18:52:52 2025 +0200
@@ -67,7 +67,7 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
- <meta name="viewport" content="width=device-width" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress › Installation' ); ?></title>
@@ -232,12 +232,13 @@
}
/**
- * @global string $wp_version The WordPress version string.
- * @global string $required_php_version The required PHP version string.
- * @global string $required_mysql_version The required MySQL version string.
- * @global wpdb $wpdb WordPress database abstraction object.
+ * @global string $wp_version The WordPress version string.
+ * @global string $required_php_version The required PHP version string.
+ * @global string[] $required_php_extensions The names of required PHP extensions.
+ * @global string $required_mysql_version The required MySQL version string.
+ * @global wpdb $wpdb WordPress database abstraction object.
*/
-global $wp_version, $required_php_version, $required_mysql_version, $wpdb;
+global $wp_version, $required_php_version, $required_php_extensions, $required_mysql_version, $wpdb;
$php_version = PHP_VERSION;
$mysql_version = $wpdb->db_version();
@@ -298,6 +299,29 @@
die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . $compat . '</p></body></html>' );
}
+if ( isset( $required_php_extensions ) && is_array( $required_php_extensions ) ) {
+ $missing_extensions = array();
+
+ foreach ( $required_php_extensions as $extension ) {
+ if ( extension_loaded( $extension ) ) {
+ continue;
+ }
+
+ $missing_extensions[] = sprintf(
+ /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: The PHP extension name needed. */
+ __( 'You cannot install because <a href="%1$s">WordPress %2$s</a> requires the %3$s PHP extension.' ),
+ $version_url,
+ $wp_version,
+ $extension
+ );
+ }
+
+ if ( count( $missing_extensions ) > 0 ) {
+ display_header();
+ die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . implode( '</p><p>', $missing_extensions ) . '</p></body></html>' );
+ }
+}
+
if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) {
display_header();
die(