Skip to content

Instantly share code, notes, and snippets.

@omega8cc
Created February 4, 2011 14:56
Show Gist options
  • Save omega8cc/811190 to your computer and use it in GitHub Desktop.
Save omega8cc/811190 to your computer and use it in GitHub Desktop.
type "mysql" when logged in as root via SSH and then paste this:
UPDATE `database`.`files` SET filepath = REPLACE(filepath, 'sites/olddomain.com/', 'sites/newdomain.com/');
UPDATE `database`.`node_revisions` SET body = REPLACE(body, 'sites/olddomain.com/', 'sites/newdomain.com/');
UPDATE `database`.`boxes` SET body = REPLACE(body, 'sites/olddomain.com/', 'sites/newdomain.com/');
NOTE: "database" should be replaced with your site's database name from settings.php created by Aegir.
"olddomain.com" and "newdomain.com" should be replaced with existing and expected (sub)domain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment