Welcome to Centmin Mod Community
Register Now

Beta Branch centmin.sh menu option 22 wordpress allow from email override

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 26, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    11:49 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    centmin.sh menu option 22 wordpress allow from email override

    Update adds support to override the default email from address used by centmin.sh menu option 22's wp-cli installer and cronjob auto updater. By default wp-cli email notifications's email from address is the same as your wordpress administration defined email address. To override the from email address in emails sent via centmin.sh menu option 22 wp-cli initial install and cronjob wordpress auto updater so that it differs from wp administration email address (to email address), you can do it on a per domain vhost level or via global override following below instructions.

    On per domain vhost level, before running centmin.sh menu option 22 wordpress install, you would create directory /usr/local/nginx/conf/wpincludes/$vhostname and file at /usr/local/nginx/conf/wpincludes/$vhostname/emailfrom.ini where $vhostname = your intended wordpress domain name (without www. prefix) i.e. domain.com would have directory created at /usr/local/nginx/conf/wpincludes/domain.com and within the /usr/local/nginx/conf/wpincludes/domain.com/emailfrom.ini file assign to the variable SETWPADMINEMAIL_FROM your intended from email address that wp-cli update email notifications are sent from.
    Code (Text):
    SETWPADMINEMAIL_FROM=yourcustom-from-emailaddress
    

    On a global level so all subsequent centmin.sh menu option 22 created wordpress installs use the same from email address, set in persistent config file /etc/centminmod/custom_config.inc the variable SETWPADMINEMAIL_FROM your intended from email address that wp-cli update email notifications are sent from.
    Code (Text):
    SETWPADMINEMAIL_FROM=yourcustom-from-emailaddress
    

    Per domain vhost level takes higher priority if both per domain vhost level and global level are set. So you can have a global from email address for most wordpress installs and a per vhost level one for a specific domain vhost if you want


    Related to fixing Wordpress - wp-cli send emails from WP Admin address?!

    Continue reading...

    123.09beta01 branch