Syncing Development Site with Production Site I recently built my first Drupal 8 site. I've updated the production site since it's been launched, and I wanted to sync it with the development site before I create another content type.

Could someone point me in the right direction?
You simply need to sync the database and the whole complete Drupal folder. Every single file except for .htaccess and settings.php as they may be different in every environment.



And from now on you start to do things just the other way around.

git init a Git repo on your local machine. Then you do every update, every UI change, every site building task on your local machine first.

When you are done locally you do drush cex to export the new configuration into YAML files. I think you can do that from the UI as well.

Then you deploy (upload) these YAML files to your live site and start the configuration import, drush cim or UI.

Similar with updating Drupal. Wether Composer or manually, you do that on your local machine first. Then deploy the resulting composer.lock file or the updated files to your live site and start the database updates once again, drush updb or from the UI.



From now and then you get a database dump from your live site and import that locally. Maybe you download or rsync the whole sites/default/files folder to your local machine as well. This one and your settings.php are going to be ignored from Git.

That's how things are supposed to go. File changes always upstream, database dumps downstream.



After you've set up Git correctly you may start to use Git Flow. Which expects you to work in different Git branches, master and develop. And feature/* branches when developing new features locally.

Basically when you're done with a feature you merge the feature branch into the develop branch and push the changes to your Dev server. Once in a while you start a new release where the develop branch gets merged into the master branch. And the master branch would be the one that pushes stuff to the Live server.