5

Love the new new project config functionality, but if there are changes that need to be synchronised the site essentially goes down until the changes are applied manually.

I wondered if anyone had a simple way to programmatically apply the changes automatically when the site is deployed, via a webhook?

10

You can create a script to use the craft executable to sync your project config file

./craft project-config/sync
3
  • 2
    At the end of my deploy script I now run this series of commands: ./craft migrate/all ./craft project-config/sync ./craft clear-caches/all Jan 30 '19 at 13:42
  • Nice I didn't even consider there's be cli commands for this!
    – Daniel
    Jan 30 '19 at 17:23
  • This requires the migrationassistant plugin
    – Henry
    Nov 25 '19 at 1:19
2

project-config/sync has been renamed to project-config/apply.
Thus you would have to run:

./craft project-config/apply

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.