How do I update configuration/database after a core update? This may seem like a dumb question to some of you, I'm sure. After having worked with Drupal from version 6, I'm now for the first time using Drupal 8 and -- after some initial difficulties -- have actually come to enjoy the new development process (using Composer and Configuration Management etc.). However, I'm still failing to understand the indended workflow, after having completed a core update in my local installation. Here's my understanding, so far:


In case of simpler modifications -- like, say, having created a new content type -- I usually call drush cex on my local Drupal site, then transfer the contents of the sync directory to my staging (or production, if I'm feeling venturous) site (using FTP) and go to Configuration &gt; Development &gt; Configuration Synchronization to apply the changes. (Note that I can't call drush cim at this point, as I'm not able to use the terminal in my staging/production site.)
If any content has been created for that new content type in my local site, I transfer that content to staging using the Deploy module.


So far, that's working pretty well. However, how am I supposed to proceed, after having completed a bigger update that involves non-trivial modifications to the database?


Say, I'm performing a core update: composer update drupal/core --with-dependencies
I will then perform the necessary database updates locally, either by calling drush updatedb or by visiting update.php in a browser.


But then what? 

Say, I'll upload all the new files via FTP to the staging site. Clearly, I cannot also copy the local database to the staging site, because the contents would be overwritten. So, I need to import the new configuration to the staging site... but accessing Configuration &gt; Development &gt; Configuration Synchronization to update the database will probably result in an error, exactly because the database has not been updated, yet.

This is where I'm stuck. I suspect, there's a piece to the puzzle that I'm missing, but what is it?
Updating Drupal 8 roughly goes like this. First in a local instance of your site:


Run composer update drupal/core --with-dependencies to update core. (Updating all dependencies including contrib would be composer update --with-dependencies.)
Now apply database updates by either drush -y updb or by visiting /update.php in your browser.
Next export the config that may have changed now by either drush -y cex or from your Drupal back-end in the browser.
Git commit and push the updated composer.lock file and the updated config files.


Next on your live site you roughly do the same, but now import the config at the end.


Git pull the updated composer.lock and config.
Run composer install --no-dev to update the files.
Run drush -y updb or visit /update.php to apply the database updates.
Run drush -y cim or visit your admin settings to import the updated config that now should match the one you exported locally earlier.


For a more advanced deployment flow, for example flushing cache and activating the maintenance mode, see my other answer on Order of drush commands for automated deployment?