Documentation for all the situations where WordPress core sends an email, how and when they happen, and how to filter or disable each one.
GPL-2.0 License
This document lists all the situations where WordPress core sends an email, how and when they happen, and how to filter or disable each one.
This list was last updated for WordPress 6.6.
All emails sent by WordPress go through the pluggable wp_mail() function. The following general-purpose filters and actions are used in this function:
Sent when a user or visitor submits a comment that gets held for moderation.
Sent when:
Sent when a user attempts to change the Administration Email Address option on the General Settings screen.
Sent when a user clicks the link in the email requesting confirmation of the change to the site admin email address (see above).
Multisite only. Sent when a user attempts to change the Network Admin Email option on the Network Settings screen.
Multisite only. Sent when a user clicks the link in the email requesting confirmation of the change to the network admin email (see above).
Sent when:
Sent when a user resets their password after clicking the confirmation link sent by the "Lost your password?" feature (see above).
Sent when a logged in user changes their password from the user profile screen.
Sent when a logged in user attempts to change their email address from the user profile screen.
Sent when a user clicks the link in the email requesting confirmation of the change to their email address (see above).
Sent when:
Sent when a user clicks the link in the personal data export or erasure request confirmation email (see above).
Sent when a site admin clicks the Send Export Link button next to a confirmed data export request.
Sent when:
Sent when a background automatic update to plugins and/or themes completes or fails.
Sent when a background automatic update to WordPress core completes or fails.
Only sent when you are using a development version of WordPress and it's not under version control.
Multisite only. Sent when an existing user is added to a site from Users -> Add New -> Add Existing User.
Multisite only. Sent when a new user is invited to join a site from Users -> Add New -> Add New User.
Multisite only. Sent when a new user account is created via wpmu_create_user()
:
wp-activate.php
POST
to /wp/v2/users
)Details:
Multisite only.
When a new user is created, two emails are sent from the same function. One to the site admin:
and one to the newly created user:
Details:
Multisite only. Sent when a new site is created from Network Admin -> Sites -> Add New.
Multisite only, with site registration allowed. Sent when a visitor registers a new user account and site from wp-signup.php.
Multisite only.
Multisite only.
Sent when WordPress is initially installed.
Sent when a fatal error occurs in a plugin or theme and Recovery Mode is not active.
Important: The wp_fatal_error_handler_enabled
filter cannot be used by plugins as it runs too early. Information about using this filter can be found here.
Multisite only. Sent when an Administrator requests to delete their site from the Tools -> Delete Site screen.
Copyright 2015 - 2024 John Blackbourn
This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.