Skip to content

Customizing the New Admin Email Confirmation in WordPress

When you change the email address of a WordPress site’s administrator in the wp-admin Settings > General tab, an email is sent to the new email address. This email contains a link that must be visited for the change to take effect.

The default email arrives with the subject line [Site Name] New Admin Email Address and the body:

Howdy adminuser,

Someone with administrator capabilities recently requested to have the
administration email address changed on this site:

To confirm this change, please click on the following link:

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to [email protected]

All at Test Site

There are two filters available for you to modify the contents of this email, one for the body, and one for the subject line.

Changing the Body

This filter is available in WordPress 4.9 and above.

To change the body of the email, use the new_admin_email_content filter. This filter includes 5 placeholder variables that you can insert into the body contents:

  • ###ADMIN_URL### is the link you need to visit in order for the change in email address to take effect.
  • ###USERNAME### to display the username of the administrator who was logged in when the admin email address was changed in the dashboard.
  • ###SITEURL### to display the URL of the site affected by this change.
  • ###SITENAME## to display the name of the site being affected by the change.
  • ###EMAIL### to display the email address of the proposed new administrator. This is the same email that this confirmation email is sent to.


Add this code to your theme’s functions.php file or to custom plugin code:

add_filter('new_admin_email_content', 'my_admin_email_content', 10, 2);

function my_admin_email_content($email_text, $new_admin_email) {

   return "Hi ###USERNAME!

To confirm the change in administrator on '###SITENAME###' email to ###EMAIL###, click on the link below:


If you don't want to make this change, ignore this email. 


Changing the Subject Line

This filter is available in WordPress 6.5 and above.

To change the email’s subject line, use the new_admin_email_subject filter. This filter doesn’t have any placeholders, it’s just a simple string.


Add this code to your theme’s functions.php file or to custom plugin code:

add_filter('new_admin_email_subject', 'my_admin_email_subject', 10, 1);

function my_admin_email_subject($subject) {
   $site_url = home_url();

   return "[Action Required] Admin Email Address Change for $site_url";



  1. Hey Shawn. Thanks for the blog post. The Admin Email Address is one that I’m particularly interested in right now as I have a WordPress Trac ticket in the queue regarding how to deal with getting removed from that field. A lot of WordPress devs make themselves the admin email address, but later when someone else takes over, they get stuck receiving all of the admin messages, often for years, with no way to change it. Here’s the link for anyone who wants to see it and give it a star.

  2. Jamie Schmid Jamie Schmid

    Thank you Shawn, this is very timely. I make lots of microsites throughout the year for my company with lots of different owners and lots of different uses, this is another level of value I can add to the process. Adding this to my snippets!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.