3

I've been using Drupal since 4.6 and it's always been easy to copy a site from one server to the other. Make up a tarball, do a database dump, go to the new machine, unpack the tarball and load in the data and you're good to go.

I'm not finding this to be the case at all in D8. Every time I try to move between servers, I end up with fatal errors.

I find that I have to end up doing an install from scratch and then loading the database into the new install. That works, but then my /sites/default/files/config_[hash] are different, so the sites are out of sync.

What am I missing? In theory, the Configuration Initiative was supposed to make this easier, but so far for me that has not been the case.

BTW - instructions on "rebuild" - https://drupal.org/documentation/rebuild - managing config: https://drupal.org/documentation/administer/config

  • Which fatal error are you getting? Is it the general one for Symphony barfing during bootstrap (I forget what is says...), or something else? – mpdonadio Aug 6 '13 at 20:53
  • Actually... now that I look back I see I had a "Warning: Invalid argument supplied for foreach() in update_fix compatibility" which was enough that only the Warning loaded and the site didn't load at all, but it's just a warning. I think in other cases I'm getting fatal errors,but I don't remember the details. – ergophobe Aug 6 '13 at 23:32
3

I recommend using Drush as version 8.x-6.x is compatible with Drupal 8. You can then use drush archive-dump and drush archive-restore to move a .tar.gz file of your database and site files around as-needed.

  • Good idea. I'll have to upgrade drush on the origin server (it's up to 8.x-6.x on the target server) and give that try. Won't get to that until tomorrow, but I'll let you know how it goes. – ergophobe Aug 7 '13 at 1:26
2

So I didn't want to just do the drush archive-dump because how I wanted to move this with git push/pull.

I found that I needed to exempt the /sites/default/files/config_[hash] file in my .gitignore

I had previously copied it over, but for whatever reason, it didn't work.

I'm not sure whether I'm just doing something wrong, but if it's true that you need the config_[hash], then it seems like the default .gitignore that ships with D8 is going to cause problems.

I could not get negation to work

sites/*/files

!sites//files/config_

So I ended up instead ignoring dir by dir (not ideal). So instead of sites/*/files

I have

sites/*/files/php

sites/*/files/css

sites/*/files/js

sites/*/files/styles

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.