How to modify the default WordPress email address?

Source: Internet
Author: User
Tags php file wordpress email

Friends who have used wordpress, I believe they should know that the default mail will use a mailbox to send the mail, here the tribe to add, the previous address is the tribe, our own domain names are actually suffixed. If we use this email address, it is very authoritative, especially for some officially authenticated websites. however, some friends asked the tribe last time how to modify the default WordPress email address? It is actually very simple.

However, it is generally not recommended that you change the email address of the tribe. After all, it looks much more comfortable. The Mail title and address are associated with your website. as shown in the figure below:


You really need to modify the email address. There are two ways to implement this function.

1. Here we mainly modify the files in the wordpress program.

We can directly modify the pluggable. Php file under the wp-uplodes directory,

Find "wordpress @", there are three in total, one in the comment, you can ignore it, replace the other two with any name you want! For example, "SJY.

This does not seem to support Chinese, so do not change it to Chinese.

2. The last one in the topic file functions. php?> Enter the following code (this method changes the default mailbox to the administrator's contact mailbox ):

// Modify the default WordPress email address from
Function res_from_email ($ email)
$ Wp_from_email = get_option ("admin_email ");
Return $ wp_from_email;
Function res_from_name ($ email)
$ Wp_from_name = get_option ("blogname ");
Return $ wp_from_name;
Add_filter ("wp_mail_from", "res_from_email ");
Add_filter ("wp_mail_from_name", "res_from_name ");

We recommend that you use the second method. In this way, even if you update wordpress, this function will not be affected.


If you change the default WordPress email address, some friends may need this function. The default email address is used by the tribe. We do not recommend that you modify it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.