What if you want to change the email address for the WordPress site but it’s not working? You know, the WordPress Administration email address in the main settings. And for whatever reason, the confirmation email never reaches your inbox. Well, there’s another way.
Time needed: 1 minute
There’s a simple method via WP CLI that allows you to change that email address.
- Connect to your site
Find your favorite Terminal app and connect via SSH to your WordPress site.
- Navigate to the root folder of your WordPress site
9 out of 10 times you can only use WP CLI commands when you’ve navigated to the root of your WordPress installation. An easy way to check where you are is to use the
lscommand. That will show you what files are in the directory where you are.
- Update the admin_email address
Copy and paste the following command:
wp option update admin_email email@example.com
Make sure to change the
firstname.lastname@example.org address to what you want to change it to and hit enter.
- Check and double check
If all went well you will see no errors after hitting enter. Double check in the WordPress Dashboard Settings if your change was what you intended, but that’s it.
That’s it. All done. Want to learn more about what you can do with WP CLI? Check out my courses.