Dazzlingly Easy Sitecore Content Comparison with Razl

Friday, April 09, 2021
Layer One - Sr Director of Software Delivery - Phil Busch

In my daily work with our clients, I create many interaction points between the code I write and Sitecore content tree items. When I deliver a piece of functionality that utilizes C# ASP.NET Controllers, I am creating Sitecore Controller Renderings that help the Sitecore site locate and execute that code. Additionally, there are often Templates that go with the functionality that help drive the content editing experience.

Occasionally, I also find that I am also helping our clients move content between two different Sitecore environments. Sometimes our clients are setting up complicated content in a test environment, and then need assistance getting that to their production public site. A scenario where this is common is when one of our clients has an important marketing campaign coming up, and they want to get everything just right with the associated content before making it live to the public.

There are lots of different tools that I am using to solve these problems. I often find that I am using serialization tools, such as Unicorn, TDS, or the new Sitecore CLI based serialization, to write this content to disk in a portable file-based format, and then syncing it in a target environment. These types of tools work well in the software development processes that we follow, as those files can be tracked under version control along with the rest of the code that we create and support.

Sitecore also offers a feature called Package Designer that allows for the export of Sitecore items into a ZIP file that can be installed in a target environment. This tool has a place in my toolbox as well. When serialization is not available, or the serialization strategy does not cover the items that I am moving, packages can be a good option. I can install the package in the target environment and move the Sitecore items easily.

I am still finding some gaps in my workflow between the serialization and package strategies. There are scenarios that we encounter with our clients where we need to move a large quantity of items between two Sitecore instances. This may happen content or code development has been done in two different environments, and a larger quantity of items needs to be synthesized into one target Sitecore environment.

For scenarios like these, I enjoy using a tool called Razl. Razl is a tool provided by Sitecore as part of their Developer Collection. Razl provides the ability to see a "diff" of two different Sitecore databases. This allows for a Beyond Compare style experience between two different Sitecore trees, potentially in two different Sitecore environments.        

Razl supports connecting to Sitecore instances, both local and remote. Razl will allow for saving and managing connections to various Sitecore environments from within the tool. For a Sitecore environment to use Razl, a one-time install of a Sitecore package must be performed on the target environment. This installs an ASP.NET Web Service in the Sitecore environment that allows for connectivity from Razl to the environment. The Sitecore package that Razl generates includes a unique Access GUID to ensure that only authorized individuals can connect to the target environment.

Once connected, there are many operations available to compare, migrate, and delete content between the two environments. Razl will show what is different between two environments and give me the option to delete or move it in just a few clicks. The image below shows a movement of an item missing in the web database from the master database in a test site on my laptop:

Copy Items with Razl 

There are other great features too. Razl can deep compare a piece of the content tree between the two environments, which will compare a node in the tree and all subitems recursively for differences. This allows for a speedier workflow when copying lots of items. Since serialization and packages often cover cases where I am just moving a few things, having a tool that makes it easy to move many items at once is great. The tool can also merge content trees together, which I find to be very helpful too.

Razl is a tool that solves some interesting problems we encounter here. It is available at their website:

Interested in learning more?

Contact Us
Cookies help us improve your website experience.
By using our website, you agree to our use of cookies.