Sender Email

Hi, Question:

I want to change the sender email address from wordpress@domain. I got told to change the themes functions.php and add the following:

add_filter(‘wp_mail_from’, ‘new_mail_from’);
add_filter(‘wp_mail_from_name’, ‘new_mail_from_name’);

function new_mail_from($old) {
return ‘no-reply@fastwp.de’;
}

function new_mail_from_name($old) {
return ‘fastwp.de’;
}

What is the best way to keep it through updates? Child theme?

Hello Daniel,

As I understand, your question is:

What is the best way to keep it through updates? Child theme?

The answer to this question is yes, to keep changes in functions.php file you have to create a child theme.

Hope it helps. Feel free to ask any other questions you might have :slight_smile:

Best Regards, Roman.

Question answered, thank you Roman.

One more: I once tested child themes and I had to do a lot of configuration again. The child theme was fresh and had standard settings.

That would mean I would have to build a test site, create the child theme and then restore the test site at the production server.

Right or wrong?

Right. It is one of possible ways to do this.

You can also use Customizer Export/Import plugin to automate the process a little bit :slight_smile:

Kind Regards, Roman.