Is there a single Unicorn setting which can completely disable unicorn synchronisation for a Sitecore instance? At the moment if I want to turn off synchronisation, I just delete the App_Config\Include\Unicorn folder, but I would like an easier to restore option if possible!
-
you can rename files to .disabled if you want :D – Andrey Bobrov May 19 '17 at 7:33
-
@AndreyBobrov I just wanted to avoid having to rename 8 files and then un-rename them afterwards! – Matthew Dresser May 19 '17 at 8:04
-
you can create a script for that – Andrey Bobrov May 19 '17 at 8:49
It is enough to make a Unicorn folder hidden. But you need to make sure that you don't have any other config patches in out of the Unicorn folder for /sitecore/unicorn/
section or it's children.
-
-
3Renaming
Unicorn.config
toUnicorn.config.disabled
gave me an error on startup of the site/every page:Could not find configuration node: /sitecore/unicorn/configurationProvider
– Don Cheadle Dec 16 '19 at 20:17
On Sitecore 8.1 I had to disable (rename file to .disabled at the end) these 7 files to fully disable Unicorn and not get errors.
- Unicorn.AutoPublish.config.disabled
- Unicorn.config.disabled
- Unicorn.DataProvider.config.disabled
- Unicorn.Deployed.config.disabled
- Unicorn.Remote.config.disabled
- Unicorn.Tfs.config.disabled
- Unicorn.UI.config.disabled
as some other answers explained, you could just disable the files. A more, in my opnion, convient solution is to use the rule based configuration that was introduced a few versions ago. It can be used as some kind of feature toggle, thorough information can be found here
in the web.config, add an appsetting:
<add key="UnicornEnabled:define" value="Enabled" />
within the sitecore patch files for unicorn, register the feature toggle settings:
<configuration xmlns:UnicornEnabled="http://www.sitecore.net/xmlconfig/UnicornEnabled/">
ANd last, but not least, toggle the configuration settings which need to be enabled/disabled. If you'd like to enable/disable a complete patchfile, just configure the sitecore node as follows:
<sitecore UnicornEnabled:require="Enabled" .... />
at the moment that you'd want to disable unicorn, just flip the appsetting to something else, and your unicorn is disabled.
I was able to disable unicorn by adding the .disable
extension to all .config
files within the \App_Config\Include\Unicorn
directory.