Workflow using Drush
This page assumes you are familiar with using Drush, and that you have the latest version.
The following example shows how to export changes from development to production sites. The reverse is also possible.
- Install Drupal 8. We will call this site "Live."
- Make a copy of this site (We'll call this "Development"). Make the copy by using the same source code, the files directory and a database dump of the Live site imported on Development. With Drupal 7 you would have only needed the database dump and uploaded files, in Drupal 8, other parts of the file directory are relevant, including the configuration and PHP files. A full copy of the site will do.
Upon completion of , it will be possible to install a fresh site from existing configuration, so copying the site will be as easy as installing a new site with the configuration exported. Until that issue is fixed, you will need a full copy of the site.
- On the Development site, change the site name in
- In your terminal, go inside your Development site and write the command
drush config-export. This exports the configuration to your sync directory. The current contents of your export directory (called "sync" by default) will be deleted.
- Use a tool (rsync, Git, FTP, SCP) to copy the content of the Development sync folder to the Live site's sync folder.
- Using a terminal, go inside your Live site and write the command
- Drush will display the available configuration changes and prompt you with "Import the listed configuration changes? (y/n): ". Type "y" to confirm.
You may want to change the location of the sync directory.