I have a site that is live and people are actively putting in content. However, I have had to make some changes in the development environment, which has taken me a couple of weeks to do. The changes required new modules to be installed and old ones to be removed, which of course changed the database contents and structure.

My question is how do I upload this site back to the live environment and update the database without overwriting the new content new users that have been added over the last two weeks?

  • I guess you will have to lock down the live site ie "no user may apply updates", syncronize the live site to your development server, apply your changes and syncronize again. I have the following setup: Development server (only to add updates code etc), a Master server - the development server is deployed to this, (where users add content) and a live server (the master is deployed to this one). Jun 26, 2012 at 8:07

5 Answers 5


Thomas Zahreddin is right. But depending on what has changed ("has taken me a couple of weeks ... "), there are more things to consider.

  1. Did you add/change content types. Try to export and import them. Make sure you are not losing contents.
  2. Did you add/change views? You can safely export and import them.
  3. Module Updates. Test them on current data. There's always a chance that user data breaks an update.
  4. Module configuration changes. If it's not too much, take notes and redo them. Else try the features and strong arm modules. Another option is to figure out the exact variable names and write the values into the settings.php.
  5. You have additional content in the dev system. Here things get really hairy. You can try the deployment module or node export. But they are no silver bullets.

If you don't have trivial case, I sugest to test your procedure beforehand. And of course take backups of files and data before you start on the live system. (Backup and Migrate comes in handy here.)


You've got to check what you want to change:

  • contenttype or bundle -> insert the new contenttype|bundle, export and import the nodes, or change the contenttype|bundle in the database for this records
  • name of single fields and there occurance in contenttypes |bundles -> e.g. with admin interface or
  • values in fields -> hardest task: you can do this via SQL in the database (probably) or with a module like migrate

I have the same procedure to handle at work when updating Drupal websites. The biggest problem is that Drupal does not really do a great job at keeping content and logics apart in its database.

The answers given by Thomas Zagreddin and BetaRide would suffice at giving you a best chance at completing the migration successfully. There is really no holy grail on this subject.

I would like to give you a development tip though which saves me a lot of trouble keeping our websites up to date: Try to keep your logics as much as possible in your code (modules / themes). Like, try to avoid creating Views as much as possible. Sometimes you will have to, but that will require another database update...

Use Source Control Management!

If you are able to keep everything down to the code (of course, you wont always be able to do this), you can simply use a SCM like Git, SubVersion or Mercury to update your source, and in worst case scenario revert to a previous version of your source if your update is not working out as planned.

And, of course, as addressed in the previous answers: backup, backup, backup, backup...


For most of the changes you can use Features Module This module can change only the changes, what have you done on the local environment .

Otherwise you can use this beautiful module Backup and Migrate Just install this module online first then take the backup of whole existing content or database, then deploy this on local. Then make change on local what you want, again take backup of your local and then deploy it on online.


I just had the same problem. To solve it I noted that the only content I had in live that was not in dev was new user details. I simply went in to the People tab of admin and copied the people details across to dev. In dev I just typed them in without any kind of automation. So the next time I upload from dev the people details will naturally be right and will not be overwritten.

  • Welcome to Drupal answers! While I am sure the above worked just great for you, it does not sound very robust. Typing stuff in is prone to typos, and if there is new stuff on live the next time around, it will get overwritten (unless you remember to type it in again). Apr 16, 2014 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.