When we’re building a new WordPress powered website one of the very first things we do in the setup process is create the first admin user. The email address associated becomes the main admin for the site. You can see this under Settings > General
:
This address is used for notifications of WordPress updates and in our case, default Gravity Forms notifications. This is great during development, but what about once the site has gone live and you hand it over to the customer?
The WordPress way
WordPress implemented this change late last year in the 4.9 release and was done for security reasons. Here’s what was said during the announcement:
A few account security enhancements have gone into WordPress 4.9. The intention is to make it more difficult for an attacker to take over a user account or a site by changing the email address associated with the user or the site, and also to reduce the chance of a mistaken or erroneous change causing you to get locked out.
If you update the email from the WordPress admin area, the change is not immediately made. A series of emails are sent out and a confirmation link must be clicked:
Once confirmed, the new email address is set, and the previous email is sent a notification.
For most users, this is the preferred way to update the admin email account.
Updating without going through the confirmation process
We like to set the admin email upon launch to the site owner. Launch day is usually a pretty hectic affair and adding another request to the owner’s list is not always easy or a good idea. So here’s the simple way to do it without having them confirm:
phpMyAdmin to the rescue
Like many things, the WordPress MySQL database is a good place to go for changes. The WordPress admin email can be updated from the database as well. Here’s how:
- Log into the database. phpMyAdmin is a good choice.
- Locate the
wp_options
table. - Near the top locate the
admin_email
option - Edit the
option_value
field with the new email. This can be done either inline, or by editing depending on your version of phpMyAdmin - Save your work if it wasn’t auto-saved
That’s it!
42 Comments
Great!
It working.
Tks a lot.
yes it helped… specifically the database one :)
Cheers….
This is one of the more annoying updates to go into WordPress in many years. (Been working with WordPress since 2006)
It’s a nice idea, but WordPress’s email php program is not terribly reliable, especially on some host platforms.
This ends up creating a lot of work for no solid reason.
Yes, it does feel like a brute force approach to security, much like a pat-down at the airport. I’ve never seen an attacker attempt to take over a site by changing the site admin this way. That said, it’s certainly possible to do and I have seen customers change the admin email by mistake. Until a better solution comes along, I’m okay with WordPress trying out security changes.
I no longer bother the customer with an email volley on this. I’m in the database anyway and it’s a quick change.
You don’t need to use a database editor for this. Browse to /wp-admin/options.php, search for the admin_email field, and update it there. This bypasses the confirmation check.
(Just confirmed this on WP 4.9.2.)
Thanks for the tip Rick. I don’t normally recommend editing WP core files, but if it works for you that’s great!
Thanks Rick I just did this because for over a month I have not been about to receive a confirmation email when trying to change it! Lets hope I will actually receive the emails since i bypassed the confirmation!
Worked for me nut all my emails going to the spam folder. how can I fix that issue?
Thanks
Nothing in this post will cause all of your emails to go to spam. Must be a completely different issue.
Does not work. When I save in options.php, get error message:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
Genius! Thanks. Been toying with that for some time.
This fixed a long row of dominoes. First there is a plugin that updated, messed up things. Needed to make a backup but wanted it to go to the new email. Could not get the confirmation. Your help fixed that, now I can go back down the chain of problems without waiting hours or never. Thanks!
FWIW, I recently had a typo when changing the admin email address. Since the address I entered wasn’t a real address (I typed suport@domain instead of support@domain), the email was never delivered and I couldn’t confirm the change. I still was able to get emails sent to the old admin email though. If I had made the mistake in the database, it may have taken a while to figure out why emails aren’t being delivered. At first I thought this was a bit of a pain, but it’s actually a useful feature.
There is a slight problem. How do I locate this wp_options table in the PHPMyAdmin? I’ve tried looking for a while now, but this table does not seem to exist at all. Of course, coding stuff can be considered a foreign language for me.
I also cannot change that email because the old email does not exist any more, and WordPress will keep sending to that old email. Very, very, very annoying. They don’t provide a way to even get around this.
Hi Zach. The
wp_options
table is required so it definitely exists. You may have a different prefix however, so look forxyz_options
or similar. Changing the admin email via PHPMyAdmin is meant to solve the problem for those without access to the original email account.Met
hod 1 not work because not getting confirmation email
Method 2 changing in DB Its showing up new email in Administrator email followed by message in bottom.
This address is used for admin purposes. If you change this we will send you an email at your new address to confirm it. The new address will not become active until confirmed.
but i am not getting any confirmation email yet
If the admin email has been change to the you want, you can dismiss this message.
some databases dont state Wp-admin,
but just Option.
In case you cant find wp-admin
I changed out the wp_options & wp_users with my new email but when I go back to General settings in WordPress the other email I do not want is still there.
Hi Ted, you shouldn’t need to change anything in
wp_users
, try going back and following along again.Hi Bryan,
I changed the admin user using the wp_options from user@example.com to admin_email : dream******@gmail.com
And also changed the user email using wp_users, Bcoz it was not my email id “user@example.com” so i changed in the wp_users to my email as user_email : dream******@gmail.com
What happens if we change wp_users ?? do we face any further problem., as you mentioned you shouldn’t change in wp_users, please kindly explain.
Thanks in advance
Great post! There is also a plugin in the repo that you can use to do this.
Change Admin Email
https://wordpress.org/plugins/change-admin-email-setting-without-outbound-email/
Great pot Bryan. I was searching for an easy way to change the admin email id because, till now, I was using a plugin to change the admin email address and it was hurting my website speed as I need to install a plugin just to change an email id. But now as you mentioned that we can change the email from the database, it is the best way I think. However, we need to be careful whenever we are working with the database as it is very sensitive.
Good advice Rajesh. Care certainly should be taken when editing the database. Taking a backup before you edit is a smart thing to do.
Bryan,
Thanks for this. It was super frustrating trying to change the admin email, and the other solutions I found involved installing plugins, and setting up SMTP servers, and were just nuts for the seemingly simple end goal of “change email”. You’re awesome!
Excellent, glad it worked for you Keith.
What a champion! Thanks so much for the fix and take care :)
Glad we could help Lara. Thanks for stopping by ;)
Great!
It working.
Thanks for guidence.
That helps me, now I can change to any email address when client wants. Some client even don’t understand what is meaning of confirmation email and how to confirm it. So, this is better we change email going through Database, so no conflict with clients understanding. Thanks for this tutorial.
I don’t hardly bother customers with this any more. I’m struggling to remember if even one client has confirmed the change via email… Glad we could help.
Thanks for writing this tutorial, but for me it didn’t work. I successfully changed the address in the database, but when I look at the user profile, it still shows the old email.
Or am I now confusing something?
What about the situations where you have both an admine-mail and an admin user e-mail?
Thanks!
I would double check that you actually did save the new address in the database. This is where that value is set so if it didn’t work, it wasn’t done quite right.
I’m not sure what you mean by having both and admin email and an admin user email. Can you clarify?
This happened to me too. After setting the e-mail address I wanted (new@test.com) in phpmyadmin, and confirming it was there I still saw the old e-mail (old@test.com) showing in settings.
After fiddling around with it I found the trick was to use phymyadmin to remove the old e-mail and set it to a temporary e-mail you have access to (temp@test.com). Then go to the settings page and change it to the e-mail you want (new@test.com) – you will get a confirmation e-mail at the temporary e-mail (temp@test.com) and THEN it will be changed in settings.
I don’t know why the settings page isn’t reading directly what we set in phpmyadmin – but I suspect the reason I had to use a temporary e-mail is the system rejects a change from new@test.com to the same address of new@test.com – which we bypass with temp@test.com
Thanks for the tip Rick!
is it possible? I was shocking before i read this blog. very helpful to me as wordpress developer thank you so much
Thanks for posting this. Its funny no wonder how long I work in WordPress I still forget where things are sometime and articles like this make it so much easier to jog ones memory. Thanks again.
Hello! I found your post doing a google search on how to fix this issue. I was able to log into the phpadmin via my host. Do you know how long it takes for the email to update in wordpress? It’s still showing my old email in the admin field. Thank you.
Ok, Please add plugin
https://wordpress.org/plugins/change-admin-email-setting-without-outbound-email/
Upon activation, you need to visit the Settings » General page. Go to the ‘Administration Email Address’ option and enter the new email address you want to use.
Thanks
I was able to change the Admin email via this method. However, in the Settings > General, it still says ” The new address will not become active until confirmed.” Does this matter? Is the new address active? How can I tell?
Hi Sally, if you changed it in the admin area it’s likely the new email is now active. When you change it this way WordPress will flip the emails that are requesting the change – meaning it thinks the new change is for the old email. I just dismiss this message. As long as the correct email is in the admin field, you’re good!
Bryan,
Another simple solution without access PHPmyadmin
Just install email-log [https://wordpress.org/plugins/email-log/] plugin before updating the new email address.
All emails are stored on the email log page. So now you can change the email address and click the confirmation link without checking your email inbox.
Hope it helps. Thanks