Email PHP Beginner

Stop “Password Changed” Emails to the Admin

Stop the site admin getting an email every time a user resets their password.

Tested on WordPress 7.1 PHP 8.3 No plugin needed Updated
functions.php 3 lines
add_action( 'init', function (): void {
	remove_action( 'after_password_reset', 'wp_password_change_notification' );
} );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

Every time any user resets a lost password, WordPress emails the site admin about it. On sites with many customers or members, those emails are noise. This snippet stops them.

How it works

WordPress sends the admin notice from wp_password_change_notification(), hooked to after_password_reset. Removing that action stops the email. The user who reset their password still gets their own confirmation.

Things to watch

  • If the admin account itself has its password reset, you won’t be told by email. Use “Get an Email When an Admin Logs In From a New IP” if you want alerts for admin activity.

How to test it

Reset a test user’s password through “Lost your password?”. The admin should not receive a “Password Changed” email.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only