Sitecore Training - Publishing (FTFM)

  • By Luke Stephenson
Luke Stephenson

Sitecore offers a number of different options when it comes to publishing, so which is the correct method for you? ...This tutorial will take you through the benefits of each option depending on what you're trying to publish, and how your site is set up.

 

Video Transcript:

When you edit or create new items in Sitecore, they must be published before they appear on your live website. To be clear, clicking the save button will just save your latest draft, you'll then need to publish that item if you'd like it to appear on your website.

When you work in Sitecore the items that you save are saved to the Master Database. When you publish items, the items are copied from the master database to a publishing target, and from the publishing target the website is launched.  The default publishing target in Sitecore is called the web database.

When you publish a new item, you can choose to publish the entire website or a single item. 
The "publish site" button publishes your entire website, starting from the root of your content tree. 
The "publish Item" button, publishes items on an individual basis.



site item publish buttons


It's important to realise that an item can only be published if all of its ancestors have been published too. So a blog post wont be published unless its parent folder, the "01" month folder has been published, and the "2017" folder has been published too.

Publish ancestors

Site Publishing


We tend to stay away from the Site publishing button becasue if there happen to be an unfiunished items in the content tree which havent had any publishing restrictions set on them, using this option will push those items onto your live website, so we tend to stick with item publishing where possible. 

There are a few different options in the publishing wizard:

  • Incremental Publish – publishes only items that are in the publishing queue. Every time you change an item, the item is automatically added to the publishing queue. If the changed item is part of a workflow, the item is added to the publishing queue when it reaches the final workflow state. Incremental Publish is the fastest way of publishing because Sitecore doesn't use resources to compare versions of the items that are in the publishing queue before publishing them.

  • Smart Publish – publishes all items that have changed since the last publication. When you run a Smart publish, every item in the Master database is compared with the equivalent item in the target database and, if an item has changed, it is published. Comparing all items in the database makes this a time-consuming way of publishing your entire website, particularly if the content tree contains many items.

  • Republish – publishes everything. Republish overwrites every item in the target database with the equivalent item from the Master database, even if it has not changed. In this way, republishing removes all obsolete versions from the target database.

  • In the Publishing language section, specify the language versions that you want publish.

  • In the Publishing targets section, specify where you want to publish the items to (usually the live website which is the  Web Database).

Item Publishing

When you open the publishing wizard, most of the settings are the same as those mentioned above. Where it does differ is where it offers the option to publish sub-items and related items. 

If the item you're publishing is a folder containing various assets that you've made for a campaign, the publish sub-items check box will allow you to publish the folder whilst automatically publishing its children items, removing the need to publish individual items one by one.

 If you have a page showing items that live in different locations (such as pictures which actually live in the media library), those items would usually need to be published as a separate process. However, checking the "Publish Related" checkbox will automatically publish the picture, along with any other related item such as cloned and aliased items. 

 Click the publish button to proceed with publishing, and when publishing is complete, you'll be shown a window which shows the number items that were processed during publishing.

 

 items changed

 

scroll back to the top of the current web page