We are going to use drupal for our website development. Initial plan is to have different environments like Dev, Staging and Production.
Because drupal stores all the configuration changes in database, whats the best way to carry changes done in Dev to Staging and Prod?
We dont want to use database dump, as we need to exactly track what changes go in which release.
I can see that we can copy all other files like the ones we have in sites/module etc directory on different environments, but database changes is the challenge.
Is there any reference on how to do it?

Thanks

Comments

lsrzj’s picture

I had a site that I was developing and it was on my PC. When I transfered the site to the destination server I had inconsistencies only because I changed the directory structure of the site. On my pc all the modules where residing at sites/localhost.lab/modules and the theme was residing at /sites/localhost.lab/themes. When I uploaded it to the server I remembered that if I used the localhost.lab path it wouldn't work because the sites subdirectory must match the main address. So I had to change it and the problem came. I had to modify all my dumped database text and search/replace all localhost.lab to bioinfo.cpqrr.fiocruz.br.

So what's my advice. Drupal as I noticed is very path neutral since it uses relative paths for everything not absolute, so if you start your site at the Dev environment and don't change any paths it's simply upload your site to the server and import your database. Another very important thing, BEFORE dumping the database from Dev to import it on the server, disable ALL modules, FLUSH ALL drupal caches, change the site theme to Drupal's default and then dump the database and on the server you can enable everything again.

Hope it helps, best regards
Leandro Scott

lsrzj’s picture

You want to sync different environments, well I don't know the best way to do this. But the tip I wrote will help you to go to the production phase, maybe there's another way to do what I did, but while I didn't do the way I told you my site wasn't able to load or loaded with many errors.

Leandro Scott

unmesh_joshi’s picture

I found some information about drupal import/export API (http://drupal.org/node/71291). But looks like it is not under active development.
What we essentially need to do is
1. Export drupal configurations (blocks etc) and import it in another drupal instance.
2. Export drupal content (actual content written by editors) and import it in another drupal instance.

Anyone has tried this?

Thanks,
Unmesh