How to Disable Password Change Notifications in WordPress

This scenario is well known to WordPress website administrators who have multiple registered users: when a user forgets their password, WordPress sends an e-mail notification to the administrator.

You can easily disable these emails if you do not wish to receive them.

Administrators of WordPress websites receive various notification e-mails by default. The e-mails are sent to the primary e-mail address of the site (specified in the general settings).

Most of the time, they inform the administrator of any automatic updates or registrations of new users. But it can be very annoying to receive e-mails even when a user resets his password on larger websites with many user accounts.

Disable password forgot notification

It is possible to disable the “password reset email” emails to the administrator with two lines of PHP code.

if ( !function_exists( 'wp_password_change_notification' ) ) {
    function wp_password_change_notification() {}

But note that it will not work if you integrate the code snippet into the functions.php of your theme because WP loads pluggable.php before function.php. So, you’ll need to create a plugin with these 2 lines.

Here’s how you can create a simple plugin for code snippets: Site-Specific WordPress Plugin for Code Snippets

That’s all there is to it! WordPress will no longer send email notifications about password resets. Users who have requested a password reset will still receive all the e-mails required to reset their password.
Related Video:

If you liked this post, please consider sharing it with your friends:


Leave a Comment