How to change WordPress admin email

by Daniel Pham
Published: Updated:

How to change WordPress admin email? In this article, I will guide you step by step to change admin email in Wordpress.

Why is it necessary to change admin email?

First, you need to know that admin email is very important in a Wordpress website. This email address has the following 2 basic tasks:

  • Receive notifications from the website, such as security notifications and update notifications.
  • Used to recover the password in case the administrator forgets the password.

So why is it necessary to change the admin email? There can be many different but common reasons such as:

  • The old email address is no longer available.
  • The admin email is the employee’s personal email and that person has now left the job and needs to be changed.
  • The admin email is the email of the programmer – the person who wrote the website. There are quite a few companies/organizations that hire other companies to make websites. And when programmers make websites, they often use their personal email and keep it that way when handing over to customers.

How to change WordPress admin email

Below I will guide you through 3 ways to change admin email.

Change WordPress admin email through Settings page

This method is the simplest of the three methods. However, the first condition is that your website must have an email sending function, such as Gmail or Yahoo mail. You can use the WP Mail SMTP plugin to set up email sending mode for your website.

Changing email will be done in 2 sections:

  • In General settings of the website.
  • In the profile of the admin user.

To change admin email in General settings. You access the Settings menu -> select General.

Then you select the Administration Email Address line as shown below. Enter your new email address and save.

How to change WordPress admin email
Change WordPress admin email in general settings.

After this step, your Wordpress website will send a confirmation email to the new email address you just entered above. You need to confirm that email to change the email address in General settings to complete.

Next, to change the email in the profile of the admin user. Select the Users menu -> select All Users. Then you select the admin user and click Edit.

How to change WordPress admin email
Edit user admin Wordpress.

In the Contact Info -> Email section. Enter your new email address and save.

How to change WordPress admin email
Change the email of the Wordpress admin user.

After saving, a confirmation email will also be sent to your new email address. You also need to confirm that email to complete changing the email for the admin account.

Change Wordpress admin email through phpMyAdmin

Depending on the hosting you are using, find the phpMyAdmin menu in the panel and open it.

First, you will find the wp_options table as shown in the image below and select Edit at the admin_email line.

How to change WordPress admin email
Change Wordpress admin email through phpMyAdmin.

When you click Edit, a new window appears and you enter the new email address as shown below.

How to change WordPress admin email
Enter a new email address for the admin_email section.

Remember to scroll down to the bottom of the window and click the Go button to save the edited results.

Next, select the wp_users table to change the email for the admin user. Similar to above, in the wp_users table, select the admin account and click the Edit button.

How to change WordPress admin email
Edit email for WordPress admin user.

Then, in the edit window, enter a new email address for the user_email field as shown below.

How to change WordPress admin email
Enter a new email for the Wordpress admin user.

And just like in the previous step, scroll down to the bottom of the window and click the Go button to save the email you just changed.

Change WordPress admin email using SQL command

Changing with SQL commands can be used for those of you who are using VPS hosting without phpMyAdmin for your website. Or for some reason you cannot access the Wordpress admin page and also cannot access phpMyAdmin.

First, you ssh into the vps and type the following command to access the MySQL (or MariaDB) cli.

$ mysql -u dbuser -p'dbpass'

You change the value:

  • dbuser: Replace it with the user database being used for the website.
  • dbpass: Replace it with the database password being used for the website.

Then, you choose the website’s database. Note to replace wordpress with your actual database name.

MariaDB [(none)]> use wordpress;

Next, you view data about the admin email of the current website with the command below.

MariaDB [wordpress]> select * from wp_options where option_id = 6;

The result will look like below.

+-----------+-------------+----------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+----------------------+----------+
| 6 | admin_email | [email protected] | yes |
+-----------+-------------+----------------------+----------+
1 row in set (0.000 sec)

Now we will update the admin email address in the wp_options table above with the command below. You change [email protected] to the new email you want to change.

MariaDB [wordpress]> update wp_options set option_value = '[email protected]' where option_id = 6;

Now we will continue to update the email address for the admin user account. First of all, use the command below to list all existing admin users in the database.

MariaDB [wordpress]> select * from wp_users;

+--------+---------------------------------+------------------------------------+---------------------------------+-------------------------+--------------------------+---------------------+---------------------+-------------+--------------------+
| ID | user_login | user_pass | user_nicename | user_email | user_url | user_registered | user_activation_key | user_status | display_name |
+--------+---------------------------------+------------------------------------+---------------------------------+-------------------------+--------------------------+---------------------+---------------------+-------------+--------------------+
| 1 | admin | $P$BNWjnJQCw63FfjxFoGklGyNm14y7wH | admin | [email protected] | http://devopslite.com | 2021-08-19 11:10:19 | | 0 | Phạm Trung Dũng |
| 2 | editor | $P$BkfVYh7ISAQo6gSI86hvkCVPEzUJ1j | editor | [email protected] | https://devopslite.com | 2021-08-19 11:14:19 | | 0 | Editor |
+--------+---------------------------------+------------------------------------+---------------------------------+-------------------------+--------------------------+---------------------+---------------------+-------------+--------------------+
2 rows in set (0.001 sec)

You need to determine the ID of the admin user that you need to update, for example in this article, the admin user will have ID of 1.

Now you will update the email of the admin user account with the command below.

MariaDB [wordpress]> update wp_users set user_email = '[email protected]' where ID = 1;

Conclusion

In this article, I have shown you 3 ways to change the WordPress admin email. You can use 1 of these 3 ways to change your website admin email. Please note that you need to change your account information and database information to suit your actual usage.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.