When setting up local or staging environments for WordPress, there are many situations where you might want to temporarily change the administrator email address.
Common examples include preventing local environments from accidentally sending emails to clients or switching the notification destination to your own email address in a staging environment.
However, if you try to change it normally through the WordPress admin dashboard, a confirmation email is sent, which can be inconvenient depending on your setup.
In this article, we’ll explore the possible ways to change the WordPress admin email without confirmation and the best methods to use from a practical standpoint.
Common Scenarios for This Method
- When you want to prevent notification emails from being sent to clients during local development.
- When you want to switch the email notification destination to the developer's side in a staging environment.
- When you need to change the admin email in an environment where you cannot receive confirmation emails.
The Specifications You Should Know First
Since WordPress 4.9, attempting to change the administrator email address triggers a confirmation email sent to the new address; the change is not finalized until the link in that email is clicked.
Furthermore, for security reasons, a notification is also sent to the original administrator email address stating that a "change request has been made."
In short, if you change the email address through the standard admin dashboard, you cannot avoid sending a confirmation email.
Changing via the Admin Dashboard
The most common method is changing it via "Settings" → "General" in the dashboard.
While this is the standard and safest procedure, it always triggers a confirmation email, making it unsuitable for cases where you want to avoid sending any mail.
What About Changing via wp-admin/options.php?
Some experienced users might be aware of the method to change the admin_email value via wp-admin/options.php.
This is an advanced screen that allows you to directly edit various WordPress options.
At first glance, it seems like changing it here would bypass the confirmation process, but actual testing shows that even when changed via options.php, a notification email is still sent to the administrator.
Therefore, options.php cannot be considered a "safe way to change it without confirmation."
Additionally, because this screen lists many configuration values, accidentally changing critical values like <span class="b siteurl or home can break the site display or prevent you from logging in.
While options.php is a tool for those with the necessary knowledge to handle carefully, it is best to assume it is not a reliable method for this specific purpose.
If You Want to Change Without Confirmation, Edit the Database Directly
If you want to completely bypass the confirmation email, the most reliable method is to directly change the admin_email in the wp_options table of the database.
Since this method bypasses the standard WordPress setting change flow, you can overwrite the value without going through the confirmation process or the email dispatch system.
The record to be changed is typically the following:
Table: wp_options
option_name: admin_email
An example of how to change it using SQL is as follows:
UPDATE wp_options
SET option_value = 'your-mail@example.com'
WHERE option_name = 'admin_email';
Note: If you have changed your table prefix, please use the actual table name corresponding to your prefix instead of wp_options.
Advantages of This Method
- Changes can be made without waiting for a confirmation email.
- Easily avoids sending notifications to clients.
- Ideal for temporary switches in local or staging environments.
Points of Caution for This Method
Naturally, direct database modification comes with its own set of precautions.
- Requires knowledge of database operations (e.g., using phpMyAdmin or Adminer).
- Editing the wrong record can cause site malfunctions.
- It is safer to take a backup before starting the work.
For these reasons, this method might have a slightly higher hurdle for non-engineers.
However, for those who frequently handle local or testing environments, it is an extremely useful practical technique to have in your repertoire.
Supplementary Note: Confirmation via Mailpit in "Local" etc.
In local development environments like Local (formerly Local by Flywheel), Mailpit is often included by default, allowing you to check outgoing emails locally.
In such environments, you may not necessarily need to change the admin email address to manage notifications.
On the other hand, since not all local setups include such a mechanism, the need to change the admin email arises in environments where email confirmation is not possible.
Conclusion
If you need to change the WordPress administrator email address without confirmation, the most definitive method is to directly modify the admin_email in the database.
Changes from the admin dashboard trigger a confirmation email, and our testing confirmed that options.php also triggers an email dispatch.
Therefore, direct DB modification is the most realistic solution for the goal of "changing the address definitely without triggering a confirmation email."
If you want to avoid accidental sends to clients in local or staging environments, this is a method worth remembering.