Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Setup

  1. Make sure your settings.php defines the sync directory at sites/default/config. This can look like the following:

    if ($is_installer_url) {
     $config_directories = array(
     CONFIG_SYNC_DIRECTORY => 'sites/default/files',
     );
    }
    else {
     $config_directories = array(
     CONFIG_SYNC_DIRECTORY => 'sites/default/config',
     );
    }

  2. Export all the configuration from your site (using Saving Config Changes), and commit it to sites/default/config .

Saving Config Changes

When you want to push up new database setting changes collaboratively, do the following:

  1. Make your Database changes
    1. Example: Modify permissions
  2. Make a new feature branch
    1. git checkout -b feature/yourname/kblog-2--permissions
  3. Download the configs
    1. Visiting admin/config/development/configuration/full/export will let you export them
  4. Extract to the file system at web/sites/default/config
  5. Add only the changes that you need
    1. Do not overwrite changes that are unrelated to the feature you're working on
    2. git add permissions.yml
  6. Commit the changes
    1. git commit -m "KBLOG-2 Update permissions"
  7. Push the changes up to the new branch
    1. git push origin feature/yourname/kblog-2–permissions
  8. Open a Pull Request with the new change

Loading Config Changes

When you bring down new config changes through git, you'll want to import them to the database. To do this:

  1. Bring the changes down
  2. git pull
  3. Import the configs
    1. Visit admin/config/development/configuration/full/import and click Import All



Notes

drush config-import
drush config-export


Have configuration directories outside of webroot.

Commit to config/staging.

Use drush config-import to import from staging to your Sync directory.

Use drush config-export to export from Sync to your staging directory.

  • No labels