If the mailbox for your old admin address is gone – a domain lapsed, a provider closed, the mailbox deleted – the Settings → General path for changing the Administration Email can’t finish. WordPress won’t commit the change until someone clicks a confirmation link that core sends to the new address, and the site has to send that message through its own mailer. If the site can’t send mail at all, or the configured sender is pointing at the dead domain, the link never arrives and the admin stays locked to the old value. Three ways around it, depending on what you can still reach on the site.
Why the stock path collapses
The Settings → General form field is literally named new_admin_email. Saving the page writes the proposed address straight into wp_options.new_admin_email, which fires the update_option_new_admin_email hook in wp-admin/includes/misc.php; the hook stores a validation array in a second option called adminhash and sends a confirmation link to the new mailbox via wp_mail(). The live admin_email only changes once the recipient clicks that link (
core: update_option_new_admin_email).
The confirmation message itself goes out through wp_mail(), which on a stock install hands off to PHP mail(). The default From is wordpress@<host>, where <host> is derived from network_home_url() with any leading www. stripped.
Two of the ways that message can go missing:
- No SMTP plugin configured. PHP
mail()can be lost at the host, or arrive with neither SPF nor DKIM for the sending domain.
Google says mail with neither to personal Gmail accounts might be marked as spam or rejected. - An SMTP plugin that forces the From to the old address. WP Mail SMTP and Post SMTP each have a setting that replaces the From on outgoing mail with a configured address. FluentSMTP by default does the same to any From that belongs to none of its connections. The configured address may be the dead
.co.uk: WP Mail SMTP fills its From Email withadmin_emailby default. If neither SPF nor DKIM aligns with the From domain, DMARC fails, and the response depends on that domain’s DMARC policy and the receiver.
If the link does not arrive, the fix is to skip the confirmation flow and write the values directly.
If you are the previous admin and the site still mails you, see stopping email from WordPress sites you no longer manage.
Bypass 1: WP-CLI
This is the cleanest path if you can run WP-CLI over SSH. Kinsta and Cloudways document running WP-CLI over SSH; WP Engine documents WP-CLI access through its SSH Gateway. SpinupWP documents WP-CLI in deploy scripts and SSH access for site users.
Over SSH, run:
wp option update admin_email [email protected]
wp option delete new_admin_email adminhash
The second line clears both pending-state options the Settings → General flow writes together: new_admin_email carries the proposed address and drives the admin-notices banner at the top of wp-admin, while adminhash holds the token the confirmation link validates against. Deleting only the first leaves an orphan hash row that a reader checking the DB later will wonder about.
If the WordPress user account itself was tied to the old mailbox – a separate value in wp_users.user_email from the site-wide admin_email – update that too. Find the admin’s user ID first:
wp user list --role=administrator --fields=ID,user_login
then:
wp user update <user-id> [email protected] --skip-email
--skip-email suppresses the “Notice of Email Change” notification that WordPress would otherwise send to the previous address (
WP-CLI: wp user update). Without it, WordPress sends that notice to the old mailbox.
Bypass 2: direct database write
If you only have database access (phpMyAdmin, Adminer, your host’s DB console), three rows need touching. The table prefix on your site may not be wp_; check $table_prefix in wp-config.php first.
UPDATE wp_options SET option_value = '[email protected]' WHERE option_name = 'admin_email';
DELETE FROM wp_options WHERE option_name IN ('new_admin_email', 'adminhash');
UPDATE wp_users SET user_email = '[email protected]' WHERE ID = <admin-user-id>;
Both pending-state options go in one DELETE. To find the admin’s user ID:
SELECT ID, user_login FROM wp_users WHERE user_login = 'yourlogin';
Widen the WHERE clause to list every admin if you aren’t sure which account is the primary one. After writing, clear any object cache (Redis, Memcached, or the host’s built-in caching layer): admin_email is loaded via wp_load_alloptions() and cached across requests, so a stale value will linger until the cache is flushed.
Bypass 3: a one-shot mu-plugin
If you only have SFTP – no SSH, no DB console – drop a file at wp-content/mu-plugins/force-admin-email.php (create the mu-plugins/ directory first if it doesn’t exist):
<?php
update_option( 'admin_email', '[email protected]' );
delete_option( 'new_admin_email' );
delete_option( 'adminhash' );
unlink( __FILE__ );
Must-use plugins run automatically on every PHP-executed request, so loading any page on the site runs the four lines and removes the file. The unlink( __FILE__ ) is deliberate: the file deletes itself, so you don’t have to remember to clean it up afterwards. (A full-page cache doesn’t change this – mu-plugins only run on PHP-executed requests, and one such request is enough.)
If the WordPress user also needs an update, add it before the unlink:
add_filter( 'send_email_change_email', '__return_false' );
wp_update_user( [ 'ID' => 1, 'user_email' => '[email protected]' ] );
The filter suppresses the “your email changed” notice that would otherwise go to the old mailbox. Set ID to match the admin account – usually 1 on a site set up by a single admin from the start, but confirm from Users → All Users (the numeric ID appears in each row’s edit-link URL) before trusting it.
After the change: the From address
Updating admin_email fixes the Settings → General value and clears the lockout. It doesn’t necessarily fix the From header on outgoing mail. Two cases:
- No SMTP plugin. WordPress derives the default From from the host portion of
network_home_url()(prefixedwordpress@,www.stripped). Once the site’s canonical URL is on the new domain, outgoing mail should align – confirm by sending a test and checking theFromandReturn-Pathheaders. - An SMTP plugin with a configured From override. WP Mail SMTP, FluentSMTP, and Post SMTP each hold their own From address, independent of
admin_email– update it there, not just at the site level. How to change the From address on WordPress email walks through the override chain in detail.
If the new domain hasn’t been authenticated at the sending provider yet – no SPF include, no DKIM record, no verified sender identity – delivery will fail even once the From is right. DNS records for WordPress email covers that side.
Corrections
- 2026-11-26: an earlier version said most managed hosts expose a WP-CLI console. That count had no source. Kinsta and Cloudways document running WP-CLI over SSH; WP Engine documents WP-CLI access through its SSH Gateway. SpinupWP documents WP-CLI in deploy scripts and SSH access for site users.
- 2026-11-26: an earlier version said the confirmation link never arrives when the site has no SMTP plugin or forces the old From address, because the message is dropped or discarded. It may fail to arrive or be marked as spam; the outcome depends on the host, provider and receiver.
- 2026-11-25: an earlier version said WP Mail SMTP, FluentSMTP and Post SMTP each have a Force From toggle whose address defaults to
admin_email. FluentSMTP offers the checkbox only for SMTP, Amazon SES, toSend and PHP mail() connections, and the page now gives that default for WP Mail SMTP only.
