Skip to main content

Changing the domain at which a Drupal site is accessed

Posted in

I've just had a bit of a nerve-wracking site launch; we'd been developing a new auxiliary website for an organization that would eventually live at "smallsite.org," but was developed in the meantime at "smallsite.bigsite.org". We followed the steps for launching the site and I thought it would work pretty easily:

  • Change the name of sites/smallsite.bigsite.org to sites/smallsite.org
  • Change the domain settings for smallsite.org through the Dreamhost control panel so that the home directory was the root Drupal installation directory

Well, all this was set up, but the site didn't show up -- instead we just got an error that one of the site-specific functions defined in template.php did not exist. I tried clearing the cache, and that did nothing. I ended up following these instructions for changing the theme from inside the database, and was able to access the site. Then, setting the desired theme through the admin interface worked without a hitch.

The moral of this story: before doing any kind of site migration, etc., change the theme to a safe default like Garland or Minelli, just to be on the safe side!