Drupal - Site UUID in source storage does not match the target storage

You can fix this by changing your local site UUID using drush.

I also needed to run a mix of drush entity-updates -y and installing specific modules with drush en <module_name> -y before the configs would import on a new fresh database.

Update: you shouldn't use drush entity-updates -y anymore. See https://www.drupal.org/node/3034742


Traditionally, you would use the following before importing config:

drush cset system.site uuid "6ba9bxxx-xxxx-438x-9c8x-e5x7x3d0x347"

Or with drupal console:

$ drupal config:override

Enter configuration name []:
> system.site

Enter the configuration key [uuid]:
> uuid

Enter the configuration value:
> 6ba9bxxx-xxxx-438x-9c8x-e5x7x3d0x347

A more generic solution

For people getting tired of doing this all over again. I finally got a fix on how to do this automatically. You would have to add a pre-command for config:import with drush to set the uuid. Read all about it here: https://stefvanlooveren.me/blog/fixing-systemsite-uuid-config-import-problem-drupal-8


Actually, I was using SFTP deploy and it didn't have the file system.site.yml on my staging site. I just redeployed all files and the issue went away.