Protecting staging sites with Basic Authentication

This approach was primarily devised for use with WP Engine staging sites, but will work in any situation where you have no access to Apache’s config and need to use a single .htaccess file for multiple domains (e.g. a multisite setup). We’ve recently had a couple of projects hosted on WPEngine where we need to …

Handy sendmail debugging commands

Some sendmail commands I’ve just found useful, but couldn’t locate on Google. Get the current status of a message in the queue: grep  ‘james@example.com’ /var/log/maillog Get the headers for an email: cat /var/spool/mqueue/qf[message ID] Get the body of an email: cat /var/spool/mqueue/df[message ID] (Many thanks to my old friend Mr Matt Westby for his help with …