« Using Patch and Diff | Main | Changing the default upload directory for CKFinder »

January 23, 2013

Change site from sites/default to site/customDirectory

h/t to Eric London for another another useful post.

1. Install and patch the Site Directory Migrate module.

$ cd sites/all/modules/sitedir_migrate
$ wget http://drupal.org/files/1568538-d7_fix-2.patch
$ git apply 1568538-d7_fix-2.patch

- enable submodules as appropriate

2. Visit admin/config/system/sitedir_migrate and set From and To values accordingly. Example From:default To:newDir > Save Configuration

3. Create newDir in sites folder
$ sudo mkdir sites/newDir

4. Update file systems settings admin/config/media/file-system. Example: sites/newDir/files > Save

5. Copy file directory and settings.php over to newDir
$ cd sites
$ sudo cp -rfp default/settings.php newDir/
$ sudo cp -rfp default/files/ newDir/

6. Clear site cache
$ drush cc

Posted by kkwaiser at January 23, 2013 10:20 AM


Login to leave a comment. Create a new account.