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?
Smart publish - As 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
Publish a website - https://doc.sitecore.com/xp/en/users/91/sitecore-experience-platform/publish-a-website.html
Different types of publishing - https://sitecore.stackexchange.com/questions/384/what-is-the-difference-between-republish-smart-publish-and-incremental-publishe