diff --git a/platform/drupal/deploy_7.inc b/platform/drupal/deploy_7.inc
index 64585d4..fb3b2c0 100644
--- a/platform/drupal/deploy_7.inc
+++ b/platform/drupal/deploy_7.inc
@@ -1,5 +1,11 @@
 <?php
 
+/**
+ * @file
+ *
+ * Update paths inside database content for sites cloned/migrated/renamed.
+ */
+
 $new_url = drush_get_option('uri');
 $old_url = drush_get_option('old_uri');
 
@@ -11,6 +17,49 @@ $old_url = drush_get_option('old_uri');
  */
 
 if ($new_url != $old_url) {
+  $url_changed  = TRUE;
+}
+
+if ($url_changed) {
+
+  // Update paths for sites cloned/migrated/renamed in the multisite install.
+  $replace_patterns = array(
+    ':old' => 'sites/' . $old_url,
+    ':new' => 'sites/' . $new_url,
+  );
+
+  db_query("UPDATE {block_custom}       SET body       = REPLACE(body,       :old, :new)", $replace_patterns);
+
+  // TODO get Field API to tell us all text fields and loop over the tables ?
+  db_query("UPDATE {field_data_body} SET body_value       = REPLACE(body_value,   :old, :new)", $replace_patterns);
+  db_query("UPDATE {field_data_body} SET body_summary     = REPLACE(body_summary, :old, :new)", $replace_patterns);
+  db_query("UPDATE {field_revision_body} SET body_value   = REPLACE(body_value,   :old, :new)", $replace_patterns);
+  db_query("UPDATE {field_revision_body} SET body_summary = REPLACE(body_summary, :old, :new)", $replace_patterns);
+
+  db_query("UPDATE {system}          SET filename         = REPLACE(filename,     :old, :new)", $replace_patterns);
+
+  // Update paths for sites migrated from standalone to the multisite install.
+  $replace_patterns = array(
+    ':old' => 'sites/default',
+    ':new' => 'sites/' . $new_url,
+  );
+
+  db_query("UPDATE {block_custom}       SET body       = REPLACE(body,       :old, :new)", $replace_patterns);
+
+  db_query("UPDATE {field_data_body} SET body_value       = REPLACE(body_value,   :old, :new)", $replace_patterns);
+  db_query("UPDATE {field_data_body} SET body_summary     = REPLACE(body_summary, :old, :new)", $replace_patterns);
+  db_query("UPDATE {field_revision_body} SET body_value   = REPLACE(body_value,   :old, :new)", $replace_patterns);
+  db_query("UPDATE {field_revision_body} SET body_summary = REPLACE(body_summary, :old, :new)", $replace_patterns);
+
+  db_query("UPDATE {system}          SET filename         = REPLACE(filename,     :old, :new)", $replace_patterns);
+
+  // Is the URI in the site_name?
+  $site_name = variable_get('site_name');
+  $old_url_pattern_short = '/' . preg_quote($old_url) . '/';
+  if (preg_match($old_url_pattern_short, $site_name)) {
+    variable_set('site_name', preg_replace($old_url_pattern_short, $new_url, $site_name));
+  }
+
   drush_log(
     dt('Changed paths from sites/@old_url to sites/@new_url',
     array('@old_url' => $old_url, '@new_url' => $new_url)));
