Syncing All Configurations with Sitecore Unicorn

Posted 01/05/2017 by Ed Kapuscinski

I'm a big fan of Unicorn for serializing Sitecore items. This may be because of the month I spent sorting out unmergable TDS merge conflicts last year, or it might just be because of the rad logo.

Unicorn Logo

Either way, there's one thing that I've found frustrating when using it in Sitecore Habitat based solutions: there are a lot of configurations to sync one by one.

Unicorn Control Panel Hiding Sync All and Checkboxes

Unicorn will show you a "Sync All The Things" button, and checkboxes to let you choose multiple configs to sync at once, but those are only present when there are Multiple Configurations, all configurations have serialized items, and all configurations have valid root paths. All three conditions do not alway occur, and, most frustratingly, usually don't occur when you want the "sync all" option the most: when you first setup a solution.

In my year or so of using Unicorn, these conditions have frequently not been med, so I almost never have those handy tools available, and it's been pretty frustrating.

But, recently, while browsing the Github issue log and thinking about complaining about this, I saw that Kam posted a workaround.

This workaround, is just adding "?verb=Sync" to the Unicorn URL, and it'll perform all of the syncs, as if you clicked the "Sync all the things" button.

Unicorn Sync All The Things Button

The URL to Sync All The Things

To use the workaround, just type (or copy the above text) into your browser, and hit enter. Then, like magic, everything syncs. Unicorn figures out the order that things need to be synced in (based on dependencies) and anything with errors is handled just fine.

Unicorn Successfully Syncing All

Ironically, once you've done this once with the cheat, at least in my experience, the ability to do it again right through the UI usually becomes available.

Unicorn Control Panel Showing Sync All and Checkbox

Hopefully this tip will save you some time next time you need to sync a bunch of stuff in Unicorn.