Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren

wp_new_blog_notification ›

wp_new_blog_notification ( $blog_title, $blog_url, $user_id, $password )
Parameter: (4)
  • (string) $blog_title Site title.
    Erforderlich: Ja
  • (string) $blog_url Site url.
    Erforderlich: Ja
  • (int) $user_id User ID.
    Erforderlich: Ja
  • (string) $password User's Password.
    Erforderlich: Ja
Definiert in:

Notifies the site admin that the setup is complete.

Sends an email with wp_mail to the new administrator that the site setup is complete, and provides them with a record of their login credentials.


function wp_new_blog_notification( $blog_title, $blog_url, $user_id, $password ) {
		$user      = new WP_User( $user_id );
		$email     = $user->user_email;
		$name      = $user->user_login;
		$login_url = wp_login_url();

		$message = sprintf(
			/* translators: New site notification email. 1: New site URL, 2: User login, 3: User password or password reset link, 4: Login URL. */
				'Your new WordPress site has been successfully set up at:


You can log in to the administrator account with the following information:

Username: %2$s
Password: %3$s
Log in here: %4$s

We hope you enjoy your new site. Thanks!

--The WordPress Team

		wp_mail( $email, __( 'New WordPress Site' ), $message );

if ( ! function_exists( 'wp_upgrade' ) ) :
	 * Runs WordPress Upgrade functions.
	 * Upgrades the database if needed during a site update.
	 * @since 2.1.0
	 * @global int  $wp_current_db_version The old (current) database version.
	 * @global int  $wp_db_version         The new database version.
	 * @global wpdb $wpdb                  WordPress database abstraction object.