test.example.com is the new, drupal-powered website I've created. www.example.com is the old website I want to replace. They're both apache2 virtualhosts on the same machine:

/var/www/test.example.com/[logs, htdocs, cgi-bin]
/var/www/www.example.com/[logs, htdocs, cgi-bin]

Can I simply change the virtualhosts and htdocs directories so www.example.com now points to the htdocs directory that used to be called test.example.com, or is there a special procedure for moving between domain names?

Comments

anner’s picture

Well, you'll need to be sure you change your settings.php file and any links you've hard coded, but other than that, I think drupal should be able to handle it.

paulgami’s picture

The only thing in settings.php is the $db_url, and that's not changing, so I should be good to go. I'm not doing it until next week but figured I'd get the info in advance.
Thanks again.

anner’s picture

No, it is the base url you'll need to adjust:

/**
 * Base URL:
 *
 * The URL of your website's main page. It is not allowed to have
 * a trailing slash; Drupal will add it for you.
 */
$base_url = 'http://test.example.com';