2

What is the correct process to keep local and production sites in sync when using drupal-composer/drupal-project. Most of the solutions online only discuss updating one site and not dev, staging and production properties.

This is the current process I am using

  1. put live site in maintenance mode

  2. run composer update drupal/core --with-dependencies -vvv

    • I run this on both local and production servers
    • I noticed that this does not sync alpha and beta contributed modules
    • I noticed that running 'composer update' from the root of the project updates core and all contrib modules
  3. run drush updb

    • I run this on both local and production servers
  4. I then commit changes to git from the local site

I just want to find out what otheres are doing to keep multiple sites in sync

1

There are a number of different options that are all viable here; this is what I would suggest:

  1. On your dev site, run composer update with options to suit what you want to update.
  2. Run drush updb on your dev site.
  3. Test thoroughly; then commit composer.json and composer.lock and push to your repository.
  4. On your test site, pull your repository and run composer install. This will put all of your dependencies into the exact same state they were in on your dev site, so you will get exactly what you tested.
  5. Run drush updb on your test site.
  6. Test thoroughly again.
  7. When you are ready to deploy to your live site, put it in maitenance mode and use a file copy program (e.g. rsync) to move the exact files from the test site to live. Alternately, you can use composer install again.
  8. Run drush updb on your live site.
  9. Confirm that all is okay and take your site out of maintenance mode.
  • Thanks for your feedback. I applied your suggestions. Worked great! – allen Sep 28 '16 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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