Skip to content
ThemesIonic — home
Troubleshooting

WordPress Password Reset Email Not Sending

The screen after you click Get New Password already tells you which half failed: WordPress handing the message to the mail system, or the mail system delivering it. Read that first, then fix the right layer.

Updated 3 min read intermediate

The screen after "Get New Password" tells you which half failed: an error on the form means WordPress could not hand the email over at all; the "Check your email" page means it was handed over and lost afterwards. Those two need different fixes.

What the screen says, and what happened

Everything below happens inside retrieve_password(), which the Lost your password? form calls. It stops at the first problem and shows one of these:

What you see What actually happened Next check
Error: There is no account with that username or email address. No user matched what you typed. An address containing @ is looked up as an email first, then as a username. Try the username instead of the email, or check user_email for that user in the database.
Error: Please enter a username or email address. The field was empty when it reached the server. A security or login-customisation plugin may be renaming or stripping the field.
Password reset is not allowed for this user Something returned false on the allow_password_reset filter (on multisite, also a user marked as spam). A security plugin with a "disable password reset" option. Deactivate it to confirm.
Error: The email could not be sent. Your site may not be correctly configured to send emails. followed by a Get support for resetting your password link The key was created, the message was built, and wp_mail() returned false. Nothing left the site. Log wp_mail_failed (below). The logged reason tells you which part failed: PHP mail(), SMTP, or the From address.
Check your email for the confirmation link, then visit the login page. wp_mail() returned true: PHP or your SMTP server accepted the message. The loss happened after WordPress — spam, a rejected From address, a relay that dropped it.
WordPress lost password form showing the error The email could not be sent
Lost your password with mail not configured: WordPress reports the failure instead of pretending the email went out. Reproduced on WordPress 7.1.5.

The last row is the one people misread. That page is also shown in two cases where no email was ever attempted: a plugin returning false from the send_retrieve_password_email filter, or emptying the message through retrieve_password_message. If a membership or branding plugin customises the reset email and nothing arrives even though other site mail works, test with it disabled.

Resets sent by an administrator from Users → Send password reset use the same function. A failure there does not show the error; the notice just reads "Password reset links sent to 0 users."

Get back in first

None of the repair work needs the reset email. With SSH:

wp user update admin --user_pass='a-long-unique-passphrase'

Without SSH, set user_pass in the wp_users table through phpMyAdmin using the MD5 function — WordPress still accepts a 32-character MD5 hash at login and rehashes it with the modern algorithm. If the account itself is unusable, add a new administrator through phpMyAdmin instead. More one-liners for this situation are in WP-CLI commands worth knowing.

When the form shows the "could not be sent" error

Capture the reason with a must-use plugin:

<?php
// wp-content/mu-plugins/mail-debug.php
add_action('wp_mail_failed', function (WP_Error $error) {
    error_log('wp_mail failed: ' . $error->get_error_message());
});

Request a reset again, then read wp-content/debug.log (it needs WP_DEBUG and WP_DEBUG_LOG set to true in wp-config.php).

On a WordPress 7.1.5 test site served as localhost, the same logger printed this, and the lost-password form showed the "could not be sent" error:

wp_mail failed: Invalid address:  (From): wordpress@localhost

Typical messages and what they point at:

  • Could not instantiate mail function. — PHP mail() returned false: no sendmail binary, or the host disabled it. Switch to authenticated SMTP.
  • SMTP connect() failed. or SMTP Error: Could not authenticate. — an SMTP plugin is configured but the host, port, encryption or credentials are wrong, or the host blocks outbound SMTP ports.
  • Invalid address: (From): wordpress@… — PHPMailer rejected the From address before sending. On a site whose domain has no dot (localhost, an intranet host name), the default wordpress@localhost is enough to trigger it; elsewhere, a plugin set a bad address through wp_mail_from.

When the "Check your email" page appears but nothing arrives

WordPress has done its part, so look at what the receiving server sees:

  1. Spam and quarantine. The subject is [Site Name] Password Reset, which some filters treat harshly.
  2. The From address. Unless something overrides it, WordPress sends from wordpress@ plus your home URL's domain with www. removed. If that mailbox does not exist, or the domain's SPF record does not authorise your web server, receiving providers often discard the message silently.
  3. Authentication. Send through an SMTP service on your own domain with SPF and DKIM aligned. The wp_mail filter guide explains how the From address is set and why an SMTP plugin that replaces wp_mail() ignores core's filters.
  4. Other mail. If contact forms and order emails vanish too, it is a site-wide problem — see contact form not sending email and WooCommerce emails not sending for the same delivery checks from other entry points.

The link looks like this:

https://example.com/wp-login.php?login=admin&key=AbC123xYz...&action=rp&wp_lang=en_US

The domain comes from WordPress Address (URL) (siteurl), not the Site Address — a wrong siteurl sends people to the wrong host. On opening, WordPress moves login and key into a wp-resetpass- cookie and redirects to a clean URL, so a browser blocking cookies on that domain breaks the reset even with a valid key.

Two messages appear on the form when the key fails:

  • Your password reset link has expired. Please request a new link below. — older than 24 hours.
  • Your password reset link appears to be invalid. Please request a new link below. — the key does not match. A newer reset request replaced it, a successful login with the old password cleared it, or the email or password was changed in the meantime.

Use only the most recent email, and do not log in with an old password between requesting and using the link.

Common mistakes

  • Treating "Check your email" as proof of delivery. It only proves wp_mail() returned true.
  • Requesting five resets in a row. Each one invalidates the previous link, so the first email to arrive is often already dead.
  • Fixing SMTP but leaving the From address on another domain. Many SMTP services reject or rewrite it; set it to an address on the authenticated domain.
  • Leaving a cached login page. Exclude wp-login.php from page and edge caches — excluding a page from cache, layer by layer.

Verify

Request a reset for a test user whose mailbox is at a different provider. Confirm the "Check your email" page, the message in the inbox rather than spam, spf=pass and dkim=pass in its headers, and a completed password change through the link. Keep the wp_mail_failed logger in place: the next failure will name itself.

Frequently asked

That page only means wp_mail() returned true: the message was handed to PHP or your SMTP server without an error. It was lost after that — spam filtering, a rejected unauthenticated From address, or a relay that accepted and dropped it. Check the spam folder, then fix authentication (SMTP, SPF, DKIM) rather than WordPress.
WordPress tried to send the reset email and wp_mail() returned false, so nothing left the site. Typical reasons are "Could not instantiate mail function." (PHP mail() is unavailable) or "Invalid address: (From)" (the default From address is unusable). Log the wp_mail_failed hook to see the exact reason, and configure authenticated SMTP.
24 hours by default (the password_reset_expiration filter changes it). The link also stops working earlier if you request another reset, log in successfully with your old password, or the account's email or password is changed — each of those clears or replaces the stored key.

Related guides