Update WordPress Admin Email via WP CLI

Home ยป Notes ยป Update WordPress Admin Email via WP CLI

I find myself using the WP CLI option to change the WordPress Admin email address more and more, but I keep forgetting the format, so I’m logging it here just for me.

But, feel free to use it as well ๐Ÿ˜‰

Time needed: 1 minute

Updating the WordPress site main email address via WP CLI goes like this:

  1. Log into your WordPress server SSH

    I’m assuming you’ve already connected to your site via the terminal before, but if you haven’t, check your hosting company’s documentation on how to do that

  2. Update what needs updating

    The following command will update your WordPress site email address.
    wp option update admin_email admin@example.com

  3. Hit Enter

    You have now changed the main admin email address, the one you can find under Settings. You will not receive an email requesting you to confirm the update, this method makes it final instantly.

First name
This field is for validation purposes and should be left unchanged.

Automatically sent to your inbox, just like 🪄 

Leave a Reply

Your email address will not be published. Required fields are marked *