Disabling Emails on WordPress Staging Sites

Using a staging site is great for troubleshooting, however you don’t typically want your staging site sending out email notifications. Luckily there is an easy solution to this problem by using both the Log Emails and Disable Emails plugins. With these two plugins installed and activated, all outgoing messages will be disabled and logged within the WordPress dashboard.

Works great for local development

Typically any email customization is tedious. With these plugins installed and activated locally it’s really easy to test and review email notifications. For scripting purposes I’d recommend using the following WP-CLI command when generating new staging and local development sites.

wp plugin install log-emails disable-emails --activate