Skip to content

Instantly share code, notes, and snippets.

@davidneedham
Created August 16, 2015 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidneedham/f5d51be4fcb653a850b8 to your computer and use it in GitHub Desktop.
Save davidneedham/f5d51be4fcb653a850b8 to your computer and use it in GitHub Desktop.
Domain Access Quickfix: a script to change the server domain access domains to your local domains
# Domain Access Quickfix
# Replace the domains with your own to change from the server to local.
# Created with help from http://www.amazeelabs.com/en/blog/drush-and-domain-access-module.
function da-quickfix() {
drush sqlq "UPDATE domain SET subdomain = 'SUBDOMAIN1.FOO.LOCAL' WHERE domain.subdomain = 'SUBDOMAIN1.FOO.COM' LIMIT 1 ;UPDATE domain SET subdomain = 'FOO.LOCAL' WHERE domain.subdomain = 'FOO.COM' LIMIT 1 ;"
drush vset --yes domain_root FOO.LOCAL
drush cc all
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment