Wordpress Automatic email response when new user is set up

I have a wordpress site.  When I set up a new user they automatically get an email that let's them know there username and password and where to login.  How can I alter this file so I can add more information to the email body?

I am using WP 3.9.2
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joshua GrantomSenior Systems AdministratorCommented:
You can use a register plugin that can allow you to customize the messages to users.

Here is one for example but there are plenty more.


Here is a plugin just for editing the emails


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason C. LevineNo oneCommented:
There are also code-based ways to do it.  Are you interested in those or are plugins sufficient?
livewirewebsolutionsAuthor Commented:
I am more interested in coding it in a file.  The current file must exist somewhere??
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Jason C. LevineNo oneCommented:
If you mean "can I just open a file and edit the email message?" then you can but it's a core WordPress file so your edits will be blown away on the next WordPress update.

The correct way to do this is to use a plugin or write your own code that hooks into WordPress and substitutes the default message for your own.
Joshua GrantomSenior Systems AdministratorCommented:
// 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 your blog %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";

        @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);

        if ( empty($plaintext_pass) )

        $message  = __('Hi there,') . "\r\n\r\n";
        $message .= sprintf(__("Welcome to %s! Here's how to log in:"), get_option('blogname')) . "\r\n\r\n";
        $message .= wp_login_url() . "\r\n";
        $message .= sprintf(__('Username: %s'), $user_login) . "\r\n";
        $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n\r\n";
        $message .= sprintf(__('If you have any problems, please contact me at %s.'), get_option('admin_email')) . "\r\n\r\n";
        $message .= __('Adios!');

        wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message);


Open in new window

You can put this code into your own plugin.php file and add it to your plugins directory and activate. It isnt recommended to change anything in the functions.php because it will be overwritten when you update wordpress.
livewirewebsolutionsAuthor Commented:
hi Joshua G.  as per your code above.  I created a folder in plugins and added a php file and uploaded with this code.  I assume there is more to this as it did not appear in my plugins section of the site
Jason C. LevineNo oneCommented:
It isnt recommended to change anything in the functions.php because it will be overwritten when you update wordpress.

Uh, no.  Functions.php is in your theme and is independent of WordPress core updates.  If you are modifying a downloaded theme that isn't a child theme already, you should make a child a theme and apply all modifications there.

Tl;dr it's okay to add code to functions.php unless you are doing it to a parent theme you didn't author.
livewirewebsolutionsAuthor Commented:
Using Register Plus Redux.  Looks pretty good.
Joshua GrantomSenior Systems AdministratorCommented:
Jason, my mistake. I meant updating the theme*
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.