How to change WordPress email sender name?

WordPress CMS  send automatic e-mail to admin e-mail address with a mail sender name “WordPress” when a new user register or comment in your site. It’ll be other purpose. You can change the default e-mail sender name by adding the code below in your theme function.php file.

N.B: Please keep a backup your theme function.php file before any changes.

mail sender name WordPress

Default WordPress e-mail sender name


Follow the steps to change default WordPress e-mail sender name:

  1. Open your theme function.php file.
  2. Paste the code at the bottom of file before php closing ?> sign
  3. /** changing default WordPress email sender */
    add_filter('wp_mail_from', 'new_mail_from');
    add_filter('wp_mail_from_name', 'new_mail_from_name');
    function new_mail_from($old) {
    return 'email address';
    function new_mail_from_name($old) {
    return 'email sender name';
  4. Save the file.

After applying  the code in your theme function.php file. You will get the e-mail with your chosen sender name.

Share on :

Leave a Reply

× 9 = fifty four