Skip to content

Instantly share code, notes, and snippets.

@GloryFish
Forked from kostajh/drushrc.php
Created June 1, 2012 20:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GloryFish/2855108 to your computer and use it in GitHub Desktop.
Save GloryFish/2855108 to your computer and use it in GitHub Desktop.
Abandon install profile
// Site specific options
$options['destination'] = 'sites/all/modules/contrib';
// Site specific options
$options['destination'] = 'profiles/my_profile/modules/contrib';
# Run from the root of your site directory
export $PROFILE="my_profile"
mv "profiles/$PROFILE/modules/contrib/" sites/all/modules/contrib
mv "profiles/$PROFILE/modules/custom/" sites/all/modules/custom
mv "profiles/$PROFILE/themes/*" sites/all/themes/
-- Update contrib modules location
UPDATE system SET filename = REPLACE(filename,'profiles/myprofile/modules/contrib','sites/all/modules/contrib');
UPDATE registry SET filename = REPLACE(filename,'profiles/myprofile/modules/contrib','sites/all/modules/contrib');
UPDATE registry_file SET filename = REPLACE(filename,'profiles/myprofile/modules/contrib','sites/all/modules/contrib');
-- Update custom modules location
UPDATE system SET filename = REPLACE(filename,'profiles/myprofile/modules/custom','sites/all/modules/custom');
UPDATE registry SET filename = REPLACE(filename,'profiles/myprofile/modules/custom','sites/all/modules/custom');
UPDATE registry_file SET filename = REPLACE(filename,'profiles/myprofile/modules/custom','sites/all/modules/custom');
-- Update themes location
UPDATE system SET filename = REPLACE(filename,'profiles/myprofile/themes','sites/all/themes');
UPDATE registry SET filename = REPLACE(filename,'profiles/myprofile/themes','sites/all/themes');
UPDATE registry_file SET filename = REPLACE(filename,'profiles/myprofile/themes','sites/all/themes');
-- Truncate cache
TRUNCATE cache;
TRUNCATE cache_bootstrap; -- Drupal 7 only
TRUNCATE cache_path; -- Drupal 7 only
-- NOTE: if you are using Drupal 6, change 'registry' and
-- 'registry_file' to 'autoload_registry' and
-- 'autoload_registry_file' and skip truncating 'cache_bootstrap'
-- and 'cache_path'. The rest of the instructions should
-- work unmodified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment