Create a welcome email for newly added WordPress users

This is a welcome email plugin that needs to go into your plugins folder, create a file called something like welcome.php or welcome-email.php and paste the following code in to that file. The file then needs to be copied to your wp-content/plugins/ folder. Once uploaded login to your dashboard > plugins and look for the newly added plugin then activated it.

Now you will have more of a personalised message for your newly registered users. Changes can be made in the plugin to adapt the message you would like triggered.

Plugin Name: Welcome Email
Plugin URI:
Description: This plugin allows Administrators to change the standard WordPress welcome email.
Author: Elliott Richmond
Version: 1.0
Author URI:

// Redefine user notification function
if ( !function_exists('wp_new_user_notification') ) {

	function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {

		$user = new WP_User( $user_id );

		$user_login = stripslashes( $user->user_login );
		$user_email = stripslashes( $user->user_email );

		$message  = sprintf( __('New user registration on %s:'), get_option('blogname') ) . "\r\n\r\n";
		$message .= sprintf( __('Username: %s'), $user_login ) . "\r\n\r\n";
		$message .= sprintf( __('E-mail: %s'), $user_email ) . "\r\n";

			sprintf(__('[%s] New User Registration'), get_option('blogname') ),

		if ( empty( $plaintext_pass ) )

		$message  = __('Hi there ') . $user_login . "\r\n\r\n";
		$message .= sprintf( __("Welcome to %s! Here's how to log in and download your items:"), get_option('blogname')) . "\r\n\r\n";
		$message .= site_url('/wp-admin/') . "\r\n";
		$message .= sprintf( __('Username: %s'), $user_login ) . "\r\n";
		$message .= sprintf( __('Password: %s'), $plaintext_pass ) . "\r\n\r\n";
		// define your email addres in this line
		$message .= sprintf( __('If you have any problems, please contact us at %s.'), '' ) . "\r\n\r\n";
		$message .= __('Adios!');

			sprintf( __('[%s] Your username and password'), get_option('blogname') ),

function sqpress_mail_from ($content_type) {
  // define the email address you want as the from field
  return '';

function sqpress_mail_from_name($name) {
  // name of the account you want the email to appear in the client from field
  return 'SquarePress';


A geek who likes to cook with wp ingredients!

Leave a Reply

Your email address will not be published. Required fields are marked *