Solve missmatched Site UUID in Drupal

You might get the error on config import:

The import failed due to the following reasons:
Site UUID in source storage does not match the target storage.

This happens because your uuid value in system.site.yml is different than the one you have in the Database(active configuration storage).

As a fix, you can either get your uuid from DB and set/change it in your system.site.yml or set the uuid from the config file to match the one in DB 
 

Useful Drush commands below:

  • Get the current UUID from DB:

    $ drush config-get "system.site" uuid
  • Set a known UUID in DB:

    $ drush config:set system.site uuid <my_uuid> -y

 

********************************** ************************* ************************ **************** ****************** *********** ************** ************* ************ *************