Drupal Hooks - 10 Ways Acquia Cloud Hooks can Help You Sleep at Night

Drupal Hooks

Drupal hooks are an incredibly powerful PHP function that makes Drupal extremely customizable and flexible. Drupal hooks enable you to run custom code at a specific time such as when a node is deleted, comment is made, or even when a search result is displayed. Drupal hooks let developers change and view different data during specific times in Drupal's processes.

Acquia Cloud hooks work like Drupal hooks except they are triggered by changes to your Acquia Cloud environment. Cloud hook scripts automate development so you and your team can focus on building great websites. In our blog, we outline 10 useful Acquia Cloud Hooks that will remove mundane tasks from developers, reduce user errors, and fulfill some of the continuous integration work done on your site.

10 Hooks That Will Help You Sleep at Night

  1. Automatically rebuild your site when a new tag is deployed
  2. Ensure all module database updates are run when new code is deployed
  3. Sanitize your Production data whenever it's copied down to Stage or Development
  4. Clear Drupal caches when new code is deployed
  5. Clear Varnish caches when new code is deployed
  6. Reindex Search when a new database is deployed
  7. Turn off search indexing when copying production database to test
  8. Turn off Developer modules in production
  9. Backup the database after a code deploy
  10. Prevent Test user accounts from ending up on the Production site

Read this to get best practices to streamline website maintenance and development.