This is useful if you need to quickly change the Administration Email Address under Settings - General if the address is set to your own and needs to be changed to a client's administrative email address.
1. Add a Code Snippet in functions.php
You can add a filter to bypass the email verification process for the General Settings page.
Steps:
Go to Appearance > Theme File Editor (or "Theme Editor").
Open the functions.php file of your active theme.
Add the following lines at the bottom of the file and be sure to change the example email address to the correct client/end user administration email:
- function force_admin_email_update( $old_email ) {
- return 'new-email@example.com'; // Replace with the new email address
- }
- add_filter( 'pre_option_admin_email', 'force_admin_email_update' );
Save the changes.
2. Update the Email in Settings
Go to Settings > General.
You’ll now see the Administration Email Address pre-filled with the new email.
Save the settings.
Because the pre_option_admin_email filter overrides the email, it will skip the email confirmation process.
3. Remove the Snippet
After saving the changes, immediately remove the code snippet from functions.php.
Leaving it in place would permanently override the email in a way that can’t be updated through the dashboard later.
What It's Doing
The pre_option_admin_email filter bypasses the normal Wordpress behavior of requiring email verification. This method directly forces WordPress to display and use the new email address without sending confirmation emails.