How do you change the user that gets the notification email announcement for new comments and comment moderation?

WordPress sends the notices to the admin user. My client is the editor of the site. I want the comment notices to get mailed to the editor user and not the admin user.

How do you do that?

  • Did either answer help you? If so then please consider accepting one. Commented Sep 20, 2016 at 12:42

5 Answers 5


There's a great article explaining how to hook into 2 filters for this at https://web.archive.org/web/20200216075253/http://www.sourcexpress.com/customize-wordpress-comment-notification-emails/

To send your notifications to a particular user and not the site admin, try this for a user with ID 123:

function se_comment_moderation_recipients( $emails, $comment_id ) {
    $comment = get_comment( $comment_id );
    $post = get_post( $comment->comment_post_ID );
    $user = get_user_by( 'id', '123' );

    // Return only the post author if the author can modify.
    if ( user_can( $user->ID, 'edit_published_posts' ) && ! empty( $user->user_email ) ) {
        $emails = array( $user->user_email );

    return $emails;
add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 );
add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 2 );

I'm not aware of any hook that could change only the comment notification recipient... You would probably need to overwrite some kind of core function, but here's a small workaround you could use:

1. Disable the email feature from WordPress comments settings (unless you want to get notified too)

2. Send it manually using the comment_post action hook. Just add this function to functions.php

    add_filter( 'comment_post', 'comment_notification' );

    function comment_notification( $comment_ID, $comment_approved ) {

        // Send email only when it's not approved
        if( $comment_approved == 0 ) {

            $subject = 'subject here';
            $message = 'message here';

            wp_mail( '[email protected]' , $subject, $message );

    // Remove if statement if you want to recive email even if it doesn't require moderation

`comment_post` is an action triggered immediately after a comment is inserted into the database.
  • Never change the core files. Your changes will be overwritten with the next WP update. Filters are what is needed to change things. Commented Oct 8, 2021 at 3:43

There is a filter for changing the text of the comment moderation email:

function change_comment_email( $body, $comment_id ) {
    $body = preg_replace( "/(A new )comment/s",  "$1review", $body );
    $body = preg_replace( "/(Currently \d+ )comment/s",  "$1review", $body );
    $body = preg_replace( "/Comment:/",  "Review:", $body );
    return $body;

add_filter( 'comment_moderation_text', 'change_comment_email', 20, 2 );
add_filter( 'comment_notification_text', 'change_comment_email', 20, 2 );
  • That was not the question.
    – wickywills
    Commented Jul 11, 2022 at 7:14

If you want to send this email to multiple people then use below code in functions.php -

function se_comment_moderation_recipients( $emails, $comment_id ) {

    $comment = get_comment( $comment_id );
    $post = get_post( $comment->comment_post_ID );
    $emails = array();
   // $users =  array(set of user IDs t whome you want to send mails)
    $users =  array( 1, 16628, 15983 );
    foreach($users as $uid){
    $user = get_user_by( 'id', $uid );
    // Return emails of users .
         if ( !empty( $user->user_email ) ) {
           $emails[] =  $user->user_email;
    $emails_list = array(implode(",",$emails));
     return $emails_list;

add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 );
add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 2 );


An alternative and more flexible way to the code hacking in the other answers is:

Create an email address for the admin account of the blog. For example, [email protected] that is different from [email protected] and [email protected].

Option A: Forward site@ email to both the editor and the technical admin. I create site@ as an alias. This works if your editor is okay with receiving a copy of all the automatic email generated by the site. They just filter irrelevant email out or learn what actually happens with a site. This is good for small clients.

Option B: Set up a mail filter for site@ to automatically forward emails about comment alerts to the editor and all email to the technical admin. The technical admin can then filter to archive/delete all comment alerts so they never appear in their inbox. This initial forward to editor@ can be done on the mail server using something like procmail. Alternatively you can do it on your email client if it's up 24/7 or you can even use Gmail, Hotmail, etc. and manually build the filter.

  • Gotta love a downvote on a 2.5 year old answer without a comment. Thanks Peter Mortensen for the edit
    – paulzag
    Commented Oct 29, 2020 at 3:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.