diff --git a/src/Core_Command.php b/src/Core_Command.php index a4c0e58a..23df4a12 100644 --- a/src/Core_Command.php +++ b/src/Core_Command.php @@ -629,11 +629,13 @@ function wp_new_blog_notification() { require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + $admin_password = getenv( 'WP_CLI_CORE_INSTALL_ADMIN_PASSWORD' ); + $defaults = [ 'title' => '', 'admin_user' => '', 'admin_email' => '', - 'admin_password' => '', + 'admin_password' => false !== $admin_password ? $admin_password : '', ]; if ( Utils\wp_version_compare( '4.0', '<' ) ) {