使用配置导出创建 Drupal 8 配置文件安装程序

Create a Drupal 8 profile installer with a config export

我想创建一个带有配置导出的 Drupal 8 配置文件安装程序,以定期导出我的配置以推送 git 中的数据修改。

我试过这个教程:https://www.valuebound.com/resources/blog/how-to-create-installation-profile-in-Drupal8 但它不起作用。 我用 drupal config:export –remove-uuid --remove-config-hash

导出了配置

查看 drush drush config-export 和 Sync

https://www.drupal.org/docs/8/configuration-management/changing-the-storage-location-of-the-sync-directory

然后当您进行配置更改时 运行 drush cex 以提交更改。

更新表单时 git 您需要 运行 drush cmi 以导入配置

注意你要确保你的网站 uuids 匹配:又名

drush cget system.site uuid drush cset system.site uuid