Publishing in Sitecore

Today I am going to explain what is item publishing, site publishing, and an overview of each publishing method.


Firstly let's understand why we need to publish?


When we edit an item or create a new item in Sitecore then they must be published so that they appear on your website. When we work in Sitecore the items are saved in the Master database to make these items appear on your live site you need to publish these newly created items or updated items. On publishing the items are copied from the Master database to the Web database. This lets you save items and decide when these items should be launched on the website. In the Web database, only a single version of an item reside while in the Master database there can be multiple version of an item.


How to publish?


You can access the publish option in three ways -

1. 'Sitecore Launchpad/Desktop/Publish Site'.


 

2. 'Sitecore Launchpad/Content Editor/Publish/Publish'.

It has two options 'Publish site' and 'Publish item'. I am going to explain it later.



3. 'Sitecore Launchpad/Experience Editor/Home/Publish'.

This publish is used to publish the current item.



What is publish item and what is publish site?


Publish Site - It is used to publish your entire website starting from the root of the Sitecore content tree to the end of the content tree. There are two options in publish site.

  • Incremental Publish
  • Smart Publish
  • Republish

Publish Item - It is used to publish the item on which you are currently working in the Sitecore content tree. There are two options in publish item.

  • Smart Publish
  • Republish


What are the different publishing options available?


Incremental publish It is a technique that publishes only the items that are in the publishing queue. Every time an item is updated, Sitecore tracks these changes inside a publishing queue table in the database. When we do an Incremental publish the publishing queue table is read to get the list of items that are needed to be published. After the publish is completed this table is cleared. When the changes are published, this table is cleared automatically. If the changed items are part of a workflow, the items are added to the publishing queue when it reaches the final workflow state. Incremental is the fastest method of publishing because Sitecore does not need to compare versions of the items that are in the publishing queue before publishing them. It just publishes what has been changed and stored in the publishing queue.

Smart publishAs the name suggest 'Smart' publishes items smartly. In this publishing technique, Sitecore will look at each item in the content tree and compare it to the item in the target database (web). It will determine whether these items are needed to be updated in the target database if yes then it publishes the item otherwise it will skip it. Comparing all the items makes it a time-consuming method of publishing and it is possible that in the Sitecore content tree many items are changed.

Republish This publish technique will simply publish out each item again regardless of whether it has been changed or not, it has been published before or not. It just publishes everything from the Sitecore content tree i.e. from start to end. It is the slowest publishing method as Sitecore will transfer everything which may or may not be present in the target database (web).

References
Chirag Goel

I am a developer, likes to work on different future technologies.

Post a Comment (0)
Previous Post Next Post