Disable a patch file

Current version: 9.1

You can use patch files to customize the configuration of the Sitecore server. If you want to return the server configuration to its default settings, you can disable your patch files temporarily without having to delete them.

This topic describes how to:

Disable a single patch file

To disable a single patch file:

  • Navigate to the patch file in the file system, and rename it to end in something other than .config. For example, rename Sitecore.Analytics.Config to Sitecore.Analytics.Config.Disabled.

Disable all patch files in a layer

You can disable all patch files in a layer to quickly restore a customized test or development environment to the default settings, without having to remove the patch files.


This method disables both your patch files and Sitecore's own configuration files.

To temporarily disable all configuration files in a layer:

  1. Open the Website/App_Config/layers.config file.

  2. Locate the relevant layer definition string, for example, the Environment layer.


    Do not disable the Sitecore layer or the Modules layer. Sitecore will not load correctly if the configuration files in these layers are disabled.

  3. Add the mode="off" attribute to the layer definition. For example, to disable all the configuration files in the Environment layer:

    <layer name="Environment" includefolder="/App_config/Environment/" mode="off">

Now, when Sitecore loads, it ignores all configuration files in the layer.


You can use the Show Config tool to see the resulting configuration as it looks when Sitecore compiles it at runtime. You can also use the Show Config tool to simulate changing the configuration rules or disabling configuration layers without actually changing the configuration.

Do you have some feedback for us?

If you have suggestions for improving this article,