Stopping non-production environments from sending module update alerts

It is a best practice to keep your website's Drupal modules as up-to-date as possible for many reasons, including helping to keep your website secure. An easy way to keep track of module updates is to configure Drupal to email you when new module updates are available on

If you enable this feature with your Acquia Cloud-hosted sites, you'll receive emails from each of your environments (Dev, Stage, and Prod) informing you of any module updates. This can result in three times as much email than you probably want about module updates. While you can disable this setting in each of the environments, the next time that you copy your Prod database to Dev or Stage, you'll start receiving these emails again because the setting is stored in the database.

Disabling update alert emails in an environment

To permanently disable this feature on any server other than Prod, you can add the following code snippet to the end of your site's settings.php file:

if (isset($_ENV['AH_SITE_ENVIRONMENT']) && $_ENV['AH_SITE_ENVIRONMENT'] != 'prod') {
  $conf['update_notify_emails'] = array();

This forces the update_notify_emails setting to be empty for your non-production environments, regardless of the setting in your website's database. When this setting is empty, Drupal will ignore the update emails functionality on all environments except for the Prod environment. Your production environment will continue to generate emails regarding module updates.

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
By submitting this form, you accept the Mollom privacy policy.

Contact supportStill need assistance? Contact Acquia Support