# wp_new_blog_notification()

URL: https://chugunov.pro/api-wordpress/functions/wp_new_blog_notification/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.1.0.

## Сигнатура

```php
wp_new_blog_notification( string $blog_title, string $blog_url, int $user_id, string $password )
```

## Описание

Отправляет новому администратору письмо о завершении установки и предоставляет ему данные для входа.

## Параметры

- `$blog_title` `string` — обязательный. Заголовок сайта.
- `$blog_url` `string` — обязательный. URL сайта.
- `$user_id` `int` — обязательный. ID пользователя-администратора.
- `$password` `string` — обязательный. Пароль администратора. Обратите внимание, что вместо настоящего пароля обычно передаётся сообщение-заполнитель.

## Исходный код

Файл: `wp-admin/includes/upgrade.php:575`

```php
function wp_new_blog_notification(
		$blog_title,
		$blog_url,
		$user_id,
		#[\SensitiveParameter]
		$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:

%1$s

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
Home
'
			),
			$blog_url,
			$name,
			$password,
			$login_url
		);

		$installed_email = array(
			'to'      => $email,
			'subject' => __( 'New WordPress Site' ),
			'message' => $message,
			'headers' => '',
		);

		/**
		 * Filters the contents of the email sent to the site administrator when WordPress is installed.
		 *
		 * @since 5.6.0
		 *
		 * @param array $installed_email {
		 *     Used to build wp_mail().
		 *
		 *     @type string $to      The email address of the recipient.
		 *     @type string $subject The subject of the email.
		 *     @type string $message The content of the email.
		 *     @type string $headers Headers.
		 * }
		 * @param WP_User $user          The site administrator user object.
		 * @param string  $blog_title    The site title.
		 * @param string  $blog_url      The site URL.
		 * @param string  $password      The site administrator's password. Note that a placeholder message
		 *                               is usually passed instead of the user's actual password.
		 */
		$installed_email = apply_filters( 'wp_installed_email', $installed_email, $user, $blog_title, $blog_url, $password );

		wp_mail(
			$installed_email['to'],
			$installed_email['subject'],
			$installed_email['message'],
			$installed_email['headers']
		);
	}
```

## История изменений

- 2.1.0 — Introduced.

## Связанные

Использует: `WP_User::__construct`, [`wp_mail`](https://chugunov.pro/api-wordpress/functions/wp_mail/), [`wp_login_url`](https://chugunov.pro/api-wordpress/functions/wp_login_url/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`wp_install`](https://chugunov.pro/api-wordpress/functions/wp_install/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wp_new_blog_notification/
