Title: wpmu_welcome_notification
Published: April 25, 2014
Last modified: May 20, 2026

---

# wpmu_welcome_notification( int $blog_id, int $user_id, string $password, string $title, array $meta = array() ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#wp--skip-link--target)

Notifies the site administrator that their site activation was successful.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#description)󠁿

Filter [‘wpmu_welcome_notification’](https://developer.wordpress.org/reference/hooks/wpmu_welcome_notification/)
to disable or bypass.

Filter [‘update_welcome_email’](https://developer.wordpress.org/reference/hooks/update_welcome_email/)
and [‘update_welcome_subject’](https://developer.wordpress.org/reference/hooks/update_welcome_subject/)
to modify the content and subject line of the notification email.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#parameters)󠁿

 `$blog_id`intrequired

Site ID.

`$user_id`intrequired

User ID.

`$password`stringrequired

User password, or "N/A" if the user account is not new.

`$title`stringrequired

Site title.

`$meta`arrayoptional

Signup meta data. By default, contains the requested privacy setting and lang_id.

Default:`array()`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#return)󠁿

 bool Whether the email notification was sent.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#source)󠁿

    ```php
    function wpmu_welcome_notification(
    	$blog_id,
    	$user_id,
    	#[\SensitiveParameter]
    	$password,
    	$title,
    	$meta = array()
    ) {
    	$current_network = get_network();

    	/**
    	 * Filters whether to bypass the welcome email sent to the site administrator after site activation.
    	 *
    	 * Returning false disables the welcome email.
    	 *
    	 * @since MU (3.0.0)
    	 *
    	 * @param int|false $blog_id  Site ID, or false to prevent the email from sending.
    	 * @param int       $user_id  User ID of the site administrator.
    	 * @param string    $password User password, or "N/A" if the user account is not new.
    	 * @param string    $title    Site title.
    	 * @param array     $meta     Signup meta data. By default, contains the requested privacy setting and lang_id.
    	 */
    	if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) ) {
    		return false;
    	}

    	$user = get_userdata( $user_id );

    	$switched_locale = switch_to_user_locale( $user_id );

    	$welcome_email = get_site_option( 'welcome_email' );

    	if ( ! $welcome_email ) {
    		/* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
    		$welcome_email = __(
    			'Howdy USERNAME,

    Your new SITE_NAME site has been successfully set up at:
    BLOG_URL

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

    Username: USERNAME
    Password: PASSWORD
    Log in here: BLOG_URLwp-login.php

    We hope you enjoy your new site. Thanks!

    --The Team @ SITE_NAME'
    		);
    	}

    	$url = get_blogaddress_by_id( $blog_id );

    	$welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email );
    	$welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email );
    	$welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email );
    	$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
    	$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );

    	/**
    	 * Filters the content of the welcome email sent to the site administrator after site activation.
    	 *
    	 * Content should be formatted for transmission via wp_mail().
    	 *
    	 * @since MU (3.0.0)
    	 *
    	 * @param string $welcome_email Message body of the email.
    	 * @param int    $blog_id       Site ID.
    	 * @param int    $user_id       User ID of the site administrator.
    	 * @param string $password      User password, or "N/A" if the user account is not new.
    	 * @param string $title         Site title.
    	 * @param array  $meta          Signup meta data. By default, contains the requested privacy setting and lang_id.
    	 */
    	$welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta );

    	$admin_email = get_site_option( 'admin_email' );

    	if ( '' === $admin_email ) {
    		$admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST );
    	}

    	$from_name       = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress';
    	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n";
    	$message         = $welcome_email;

    	if ( empty( $current_network->site_name ) ) {
    		$current_network->site_name = 'WordPress';
    	}

    	/* translators: New site notification email subject. 1: Network title, 2: New site title. */
    	$subject = __( 'New %1$s Site: %2$s' );

    	/**
    	 * Filters the subject of the welcome email sent to the site administrator after site activation.
    	 *
    	 * @since MU (3.0.0)
    	 *
    	 * @param string $subject Subject of the email.
    	 */
    	$subject = apply_filters( 'update_welcome_subject', sprintf( $subject, $current_network->site_name, wp_unslash( $title ) ) );

    	wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );

    	if ( $switched_locale ) {
    		restore_previous_locale();
    	}

    	return true;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ms-functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/ms-functions.php#L1637)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/ms-functions.php#L1637-L1747)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#hooks)󠁿

 [apply_filters( ‘update_welcome_email’, string $welcome_email, int $blog_id, int $user_id, string $password, string $title, array $meta )](https://developer.wordpress.org/reference/hooks/update_welcome_email/)

Filters the content of the welcome email sent to the site administrator after site
activation.

 [apply_filters( ‘update_welcome_subject’, string $subject )](https://developer.wordpress.org/reference/hooks/update_welcome_subject/)

Filters the subject of the welcome email sent to the site administrator after site
activation.

 [apply_filters( ‘wpmu_welcome_notification’, int|false $blog_id, int $user_id, string $password, string $title, array $meta )](https://developer.wordpress.org/reference/hooks/wpmu_welcome_notification/)

Filters whether to bypass the welcome email sent to the site administrator after
site activation.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#related)󠁿

| Uses | Description | 
| [switch_to_user_locale()](https://developer.wordpress.org/reference/functions/switch_to_user_locale/)`wp-includes/l10n.php` |

Switches the translations according to the given user’s locale.

  | 
| [restore_previous_locale()](https://developer.wordpress.org/reference/functions/restore_previous_locale/)`wp-includes/l10n.php` |

Restores the translations according to the previous locale.

  | 
| [get_network()](https://developer.wordpress.org/reference/functions/get_network/)`wp-includes/ms-network.php` |

Retrieves network data given a network ID or network object.

  | 
| [wp_parse_url()](https://developer.wordpress.org/reference/functions/wp_parse_url/)`wp-includes/http.php` |

A wrapper for PHP’s parse_url() function that handles consistency in the return values across PHP versions.

  | 
| [wp_specialchars_decode()](https://developer.wordpress.org/reference/functions/wp_specialchars_decode/)`wp-includes/formatting.php` |

Converts a number of HTML entities into their special characters.

  | 
| [wp_mail()](https://developer.wordpress.org/reference/functions/wp_mail/)`wp-includes/pluggable.php` |

Sends an email, similar to PHP’s mail function.

  | 
| [network_home_url()](https://developer.wordpress.org/reference/functions/network_home_url/)`wp-includes/link-template.php` |

Retrieves the home URL for the current network.

  | 
| [get_blogaddress_by_id()](https://developer.wordpress.org/reference/functions/get_blogaddress_by_id/)`wp-includes/ms-blogs.php` |

Gets a full site URL, given a site ID.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [wp_unslash()](https://developer.wordpress.org/reference/functions/wp_unslash/)`wp-includes/formatting.php` |

Removes slashes from a string or recursively removes slashes from strings within an array.

  | 
| [esc_html()](https://developer.wordpress.org/reference/functions/esc_html/)`wp-includes/formatting.php` |

Escaping for HTML blocks.

  | 
| [get_userdata()](https://developer.wordpress.org/reference/functions/get_userdata/)`wp-includes/pluggable.php` |

Retrieves user info by user ID.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  | 
| [get_site_option()](https://developer.wordpress.org/reference/functions/get_site_option/)`wp-includes/option.php` |

Retrieve an option value for the current network based on name of option.

  | 
| [get_option()](https://developer.wordpress.org/reference/functions/get_option/)`wp-includes/option.php` |

Retrieves an option value based on an option name.

  |

[Show 10 more](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wpmu_welcome_notification/?output_format=md#changelog)󠁿

| Version | Description | 
| [MU (3.0.0)](https://developer.wordpress.org/reference/since/mu.3.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwpmu_welcome_notification%2F)
before being able to contribute a note or feedback.