When trying to export my site configurations from one Drupal 8 site to other I keep getting the following error

The staged configuration cannot be imported, because it originates from a different site than this site. You can only synchronize configuration between cloned instances of this site.

So in this context what are cloned sites? How can I override this error to import the configurations.

Clones sites are cloned instances of a same Drupal site. The

up vote 11 down vote accepted

Cloned site means that you copied the database instead of installing twice from scratch.

Drupal identifies two different sites as cloned sites by checking their uuid. If the uuids match, then it will assume that the sites are cloned instances.

Faulty configuration imports can lead to broken sites which we may not be able to restore. Hence to avoid this situation as discussed on https://www.drupal.org/node/2133325 a safety mechanism was introduced. And that mechanism was having a uuid for each Drupal site.

So if you know what you are doing and you are sure that you need to import the configurations, you can use the drush cget system.site command on source site and you can use drush cedit system.site on target website to change the uuid to that from the source.

  • 6
    In a single sentence, cloned usually simply means that you copied the database instead of installing twice from scratch. – Berdir Mar 23 '15 at 21:42
  • I installed my site from scratch and did'nt copied the database, why have i this error message? – Asy Oct 29 '16 at 22:24

Something may have changed since the last answer - I get an error when I tried to edit my site's uuid: "Site UUID in source storage does not match the target storage."

I used Drush to change the site uuid: drush ev "\Drupal::configFactory()->getEditable('system.site')->set('uuid', 'UUID-TO-SET')->save();"

This code is lifted from the config_installer profile.

This can happen in cloned sites also when I add to .gitignore and remove from git cache the exported /config/sync/system.site.yml.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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