I am developing a drupal installation on my development machine, and need to setup a couple of different live dev domains, e.g. dev1.domain.com dev2.domain.com, I'm having problem finding out if there are places I need to change in the db, .htacces files, settings, to make things work on different domains?

Thanks

Comments

betz’s picture

Hi msteudel,

For migrating a drupal site to a new server remember to turn your site into maintenance mode before.
If i can suggest you a nice module that is use for this: have a look at http://drupal.org/project/backup_migrate

This module makes a tar.gz file with whole your drupal base in it + it makes a backup of your mysql database.
Both files can be downloaded from your site.

Afterwards you make a new database on your new server, uploads the database file with phpmyadmin or something and unzip the tar.gz file of your drupal installation where you want to have the clone of the site.

When you need to change databasename or something, you can do that in your settings.php file at sites/default/settings.php

Hope this helps you
tom

msteudel’s picture

Thanks tom,

So besides database connection there aren't any areas in the db or config files that need to be updated with a new url or anything? I'm thinking of wordpress where they store the url in the db in a couple of places os if you migrate it from one domain to another you need to go in and edit that before moving it.

Thanks, Mark

betz’s picture

Mark,

It is the only place to adjust.
What you can do is install the http://www.drupal.org/project/devel module.
This creates also a block with a link to empty your cache.

Remember, always take a backup before you start to migrate. There's always a risk involved

Gauss1777’s picture

Is it really necessary to clear the cache? Can I just erase the contents of the tables "cache", "cache_filter", "cache_menu" and "cache_page" (those that are selected by default to not be included when making a backup with the module "Backup and Migrate")??? Of course I wouldn't drop the tables, just empty them with phpmyadmin or from command line.

Now I'm concerned about this: When I make a backup from a Drupal site hosted on a domain inside a subdirectory (i.e. mydomain.com/~user), the SQL backup shows entries where the subdirectory is mentioned. So I have always believed that in order to migrate successfully a Drupal site I have to change those entries to the new subdirectory on the new domain or just clear it with its extra slash if the Drupal site is going to load from the root apache-docs directory on the new domain. Is that right??? Because what happens if the former domain is the root apache-docs directory?? There's no way to add on the SQL backup entries a subdirectory for the new domain if the Drupal site is going to load from a subdirectory of course.

So Now I think, if the module Backup and Migrate is not doing that kind of change when the backup is restored through this module on the new domain+dir, then that means is not really important. Maybe those entries I believed that were necessary to change to the new subdirectory were just entries on cache tables. Who can confirm me this?

And if I was right from my former idea. How can I make changes on the SQL backup as to avoid any problem when migrating to a new domain+dir? The question rather is, how do I properly migrate in the situation depicted, where the former site is on a root directory and the new domain is a subdirectory?

Do I have to worry? Or do I just make a dump and restore as normal on the new domain without caches?

captaingeek’s picture

try it out and let us know your results.

my question is how do you export certain types of content such as a forum?