diff --git a/Provision/Config.php b/Provision/Config.php
index 4264f6c..a7c786c 100644
--- a/Provision/Config.php
+++ b/Provision/Config.php
@@ -110,11 +110,27 @@ class Provision_Config {
 
   /**
    * Load template from filename().
+   *
+   * @see hook_provision_config_load_templates()
    */
   private function load_template() {
     $class_name = get_class($this);
 
     if (isset($this->template)) {
+
+      // Allow other Drush commands to change the template used first.
+      $templates = drush_command_invoke_all('provision_config_load_templates', $this);
+      if (!empty($templates) && is_array($templates)) {
+        foreach ($templates as $file) {
+          if (file_exists($file) && is_readable($file)) {
+            drush_log("Template loaded: $file");
+            return file_get_contents($file);
+          }
+        }
+      }
+
+      // If we've got this far, then try to find a template from this class or
+      // one of its parents.
       while ($class_name) {
         // Iterate through the config file's parent classes until we
         // find the template file to use.
diff --git a/provision.api.php b/provision.api.php
index 54881fd..f596386 100644
--- a/provision.api.php
+++ b/provision.api.php
@@ -90,3 +90,18 @@ function drush_hook_provision_apache_dir_config($data) {
  */
 function drush_hook_provision_apache_vhost_config($uri, $data) {
 }
+
+/**
+ * Specify a different template for rendering a config file.
+ *
+ * @param $config
+ *   The Provision_config object trying to find its template.
+ * @return
+ *   A filename of a template to use for rendering.
+ */
+function hook_provision_config_load_templates($config) {
+  if (is_a($config, 'Provision_Config_Drupal_Settings')) {
+    $file = dirname(__FILE__) . '/custom-php-settings.tpl.php';
+    return $file;
+  }
+}
