Architecture Decision Records (ADRs)

← Home

Local wp-config.php or its analog should disable wp_mail()

Introduction

On occasion a local environment will send the “This site has encountered a fatal error” email notice to a client if they are listed as the admin.

Decision

Add the following function to the controlling wp-config.php, wp-config-local.php, or whatever the controlling file is in the local environment before pulling the database:


  // Disable Outgoing WordPress Emails
  function wp_mail() {
    //
  }
  

Context

Consequences

Exceptions

Additional Resources

← See more ADRs