Change the default wordpress@ email address

Emails sent from WordPress, such as comment notifications, are sent from wordpress@. Find out how to change this.

By default WordPress emails, such as comment notifications, are sent from

WordPress <wordpress@yourdomain.com>

Not entirely sure why WordPress doesn’t have a built-in option to change this but if you want to change it simply add this to your functions.php fileโ€ฆ

// Change default WordPress email address
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');

function new_mail_from($old) {
return 'yourname@yourdomain.com';
}
function new_mail_from_name($old) {
return 'Your Name';
}

Obviously substituting ‘yourname@yourdomain.com’ and ‘Your Name’

36 replies on “Change the default wordpress@ email address

  1. Avatar photo Anita says:

    Thank you! It works.

  2. Avatar photo ddunnvi says:

    I am adding this in, but it’s not working ๐Ÿ™ OceanWP Theme

  3. Avatar photo Connor Avery says:

    Still works a treat. Is there anyway to make this work globally across all themes present on the server? Also will this need to be included after each update of the theme?

    1. Avatar photo daretothink says:

      Hi. You would need to include the code in each of the theme’s function files. I build bespoke themes for each client so am unsure of the update process of themes you have. If you are using a child theme then you should be able to add your own functions.php file to that theme folder and that should remain as is when you update the main theme. Might be worth just testing that before updating lots of themes though.

      1. Avatar photo Connor Avery says:

        Thank you for the reply. I will let you know the outcome when the theme requires updating. Hopefully the functions file remains the same to the sake of any modifications.

  4. I am using 2 email addresses for my website! I don’t know how to change the address where I am getting contacted on a plugin called WPforms

    anyone know that?

  5. Avatar photo Admin says:

    Still works fine! In 2018 – tested!
    (sorry for the name used – Admin – I am not an admin for this site – just doing something using this name on my own website and the name was by default.)

  6. Avatar photo Adil ibrar says:

    lets try

  7. Avatar photo Anton van Elburg says:

    Works great for me! And fairly easy to do!

  8. Avatar photo Denie says:

    Many thanks for this! I run a magazine site, and we automatically send notifications when an author’s article is published. Now, we can send it from a different address than “wordpress@”. Perfect.

  9. Avatar photo David Welsman says:

    The problem with this is I have an enquiry form on the site that when the customer fills out it sends an email to the Helpdesk- and it changes the from email to the one I changed- that functions code changes incoming and outgoing- I need to change it from within the backend of wordpress

    1. Avatar photo daretothink says:

      Are you using a plugin or anything for the contact form on your site? I use Contact Form 7 for the form on this site where you can then change the from and reply-to fields to whatever you require.

      1. Avatar photo David Welsman says:

        contact form 7 does not work on the site, I use a plugin called contact bank and the functions.php way or the plugin overides any settings in the plugin- when the functions code is removed (or the plugin turned off) emails come into the helpdesk and I can click reply and it replies to the customer email- but they recieve the email with wordpress@ when the plugin is on or the code inserted emails via the form become enquiries@mywebsite.com and then I have to screw around editing the email to send to the customer

        1. Avatar photo daretothink says:

          Umm, the thing with the above method is it’s only really for the standard WP emails that get sent and not those from a third-party plugin. I’d be very surprised if there’s not an option in the plugin to change the “From” field?

          1. Avatar photo David Welsman says:

            there is an option in the contact bank plugin to make the emails coming in the customers email- BUT the 2 methods mentioned above override this to enquiries@mywebsite.com it’s overiding all emails incoming and outgoing

            1. Avatar photo David Welsman says:

              Do you know the page in the backend (that tells it to be “wordpress” I can change things via cpanel or FTP

              1. Avatar photo David Welsman says:

                this plugin https://wordpress.org/plugins/personal-email/ is the solution just upload and activate it takes the email address from the settings page and uses that to send BUT does not change the email from the webforms- woohooo this is WORKING you have no idea how long this took to find- while testing out all the other ones back and forth emails to the help desk but it works

              2. Avatar photo daretothink says:

                I can’t remember where the wordpress@ email address is situated but it’s in the WP core files which you should not alter. The function does that without the need to change the core.

      2. Avatar photo David Welsman says:

        I am currently editing pluggable.php however even here I change the word wordpress to enquiries and there is no change at all- it’s fricken annoying damed if I do damed if I don’t

  10. Yep worked like a dream! thanks!!

  11. Avatar photo Penelope says:

    I am going to use this on my website. I noticed this site has not been updated since 2014. Just double checking this still works smoothly before I place code in my functions.php — and I agree, I can’t stand using plugins. The less plugins the better! Also, where do I place this code in my functions.php ?

    I don’t mind the wordpress@mydomain.com –> I just want to change the ‘Your Name’ so it doesn’t pop up as “WordPress” in my inbox.

    1. Avatar photo daretothink says:

      Hi. The site was updated last week but yes, you’re correct this article was written back in 2014. The code should still work fine, however. Just add the code to the bottom of your functions.php file. If the functions.php has a closing end tag then make sure you place it before that.

      1. Avatar photo Penelope says:

        Wow thank you for the quick response! I will make those adjustments. I made an edit and didn’t see your response.

        I don’t mind the ‘wordpress@mydomain.com’ –> I just want to change the ‘Your Name’ so it doesn’t pop up as “WordPress” in my inbox. Will it be a problem if i leave the wordpress@mydomain.com but change the “your name?”

        1. Avatar photo daretothink says:

          If you only want to change the name then remove lines 2 and 5-7 from the code above.

          1. Avatar photo Penelope says:

            Worked like a charm. Thanks for all your help!!!

            1. Avatar photo daretothink says:

              Great stuff. Glad I could help ๐Ÿ™‚

  12. Avatar photo jobs4adams says:

    Many thanks man, you are the best.
    It works very fine.
    Cheers!

  13. Avatar photo Josue says:

    It works. Thanks!

  14. Avatar photo John S. says:

    You can use https://wordpress.org/plugins/wp-change-default-from-email/ update from name and from email easily

    1. Avatar photo daretothink says:

      Yes, you certainly can use that but as this is a simple function, there’s no need to add another plugin to your site.

  15. Avatar photo Theticus says:

    This works like a dream. Awesome! thank you so much..

  16. This is really good.
    But this is always the same mail , what if I have to get the user’s email that has compiled the form?
    How should I do?

    1. The Problem is when I click the Gmail or Aruba’s reply button.
      This will mail me to wordpress@mysite.com and not to user’s mail.

      1. Avatar photo daretothink says:

        Hi Mattia. I’m not really sure exactly what you are attempting to do? The above function is really only to change the official wordpress@ email address and nothing else.

        1. Avatar photo David Welsman says:

          when someone makes an enquiry via my webform- that enquiry comes to me with the from email as the one I set in functions.php- so when I click reply I am replying to myself what is supposed to happen is when I receive an enquiry via the web form I can click reply and it is the customers email that I am sending to

Leave a Reply

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