The process to change an email for specific user in WordPress; change user's email address in database under wp_users from phpMyAdmin.
Related Articles
Purge website's NGINX cache
Find the Document Root of a Domain
Using cPanel and phpMyAdmin
- Log into cPanel
- Open phpMyAdmin
- Open the appropriate database for site
TIP: Find the site's database name by going towp-config.phpin the document root of the site or viewing the site/home URL inwp_options - Open the
prefix_userstable - Find the user, where there will be two options to edit
- Either highlight and double-click the email to edit it
- Or click the Edit button on the left where a new page will appear allowing edits to be made
- Clicking Go will save any edits made
- Clicking Go will save any edits made
- Either highlight and double-click the email to edit it
NOTE: On WordPress hosting or VPS+ with NGINX installed, it's best to clear the NGINX cache after this is done. If the site has a WordPress caching plugin running wp cache flush on the command line.
Using WP-CLI
- Access the document root for the website in question via the command line
- Run
wp user listto find the user IDwp user list | grep myuser1
Sample output:
1 user@domain.com myuser1 user@domain.com 2018-09-12 18:02:48 administrator - In the above output, the user ID is
1(number on the far left) - To update the email, use the following
wp user update <id> --user_email=<email>
EXAMPLE:wp user update 1 --user_email=newuser@domain.com
Comments
0 comments
Article is closed for comments.