Site Directory Migrate

Component ID

669452

Component name

Site Directory Migrate

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

10545

Component created

Component changed

Component body

Site Directory Migrate allows you to change the URL/directory name of your Multi-site site.

For example if you had three sites running on the same Drupal install (site1.com, site2.com, site3.com in your /sites directory) and you wanted to change site3.com to be examplesiteA.com. In the past, you would rename the directory, run some queries if you're dapper or go through and manually change all of your content. With this module you just rename the directory, run the module (with two inputs) and it runs the queries for you. I've also written out two usage case scenarios that go much deeper than this short description.

Note: This has been successfully used with Aegir when sites need to be renamed between servers (such as between development and production environments). It is also Drush enabled to help with large migrations (hundreds of sites).

Please remember this only works for Drupal multi-site configuration. Also, ALWAYS BACKUP BEFORE RUNNING THIS MODULE since it is directly running update statements on your database. It's been tested and proven to work but it's always better to be safe.

Directions:

  1. Backup your database and your site directory*
  2. Rename your /sites/{your site url} to the new address /sites/{your new site url}
  3. Modify your webserver configuration to properly match the new address
  4. Go to your new site address in your web browser
  5. Enable the main sitedir_migrate module and its associated modules
  6. Go to {your new site url}/admin/settings/sitedir_migrate
  7. Enter in your old site directory and your new site directory
  8. Submit
  9. Manually modify your file settings in Drupal (the module will link you there)
  10. Disable the sitedir_migrate modules, you don't need them to stay enabled

* If you are using a custom theme located in the site directory that you are migrating: Set your theme to Garland before migrating.