We have a Standard Drupal site with lots of custom configurations ad custom modules. We would like to put this in a GitHub repository so that anyone can clone this repository and install the Drupal 8 site along with custom configurations on their server.

What we have tried is - we exported the configuration of the current site using the UI and tried to import it into a new Drupal installation. But then we understood that configuration can be synced only between clone sites, not a new installation.

How can we move the entire site into a git repo, without having to put any SQL dump in the repository?

  • 1
    You have to create the new site with an existing config, you can't import it afterwards, e.g.: drush site:install --existing-config, see change record – Hudri Oct 14 '19 at 7:26
  • You should put your necessary config-ymls into a config/install folder of one of your modules. It's not very common to import a config-sync to a blank site. – Rainer Feike Oct 14 '19 at 7:58
  • @RainerFeike – Though it still should work that way. All the users need to do is to install the site using the same install profile, set this new site's UUID to be the same as in the config drush config-set system.site uuid 1234-4567-789-xyz and then drush cim. – leymannx Oct 14 '19 at 9:46
  • Or maybe it makes more sense to deploy that as a pre-configured docker image? I do not know the business case. – Rainer Feike Oct 14 '19 at 10:59

Browse other questions tagged or ask your own question.