Insights

Publishing To Preview Environments In Sitecore

To send items in a workflow state to a new publishing target or preview publishing target, the first step is to create a new publishing target.

You can learn how to do this in my previous blog Adding New Publishing Targets in Sitecore.

Use Case Of Assigning Workflow State To A New Publishing Target

By default, items that are in their final workflow state can be published. However, in situations where you need to publish an item before it reaches the final workflow state.

For example, if you want the item to be reviewed by a non-Sitecore user, you can publish the item to a preview publishing target.

To facilitate this kind of setup, Sitecore includes a feature called “Publishing Targets”. Publishing Targets are listed in the publishing wizard dialog so an author can select which environment the content will be published to.

You can assign publishing target to one or more workflow states to allow items in that workflow state to be published.

When you publish to a preview publishing target, all items that are in a workflow state with this preview publishing target assigned, and all items that are in a final workflow state of any workflow are published.

This way items that are not in the final workflow state (and therefore cannot be published) can be published to an internal site.

They can be viewed and approved by non-CMS users (such as a manager or client) before publishing the content to the public site.

How To Publish Non-Final Workflow State Items To A New Publishing Target

Step 1: Select The Workflow State That You Want To Assign The New Publishing Target To

In the Content Editor (Master database), navigate in the content tree to the workflow used on your site under System/Workflows, and then select the workflow state that you want to assign the new publishing target to.

Step 2: Selecting A New Publishing Target

In the Data section of selected workflow state, select new the publishing targets to assign to this workflow state.

Select The QA Box

The list contains only the publishing targets that are specified as preview publishing targets. If you are unable to see new publishing target under Data, go to your new publishing target under /sitecore/system/Publishing targets and select Preview publishing target.

This publishing target can be assigned to workflow states that are not the final state

Preview Publishing Box In Sitecore

Step 3: Click Save

Now the items that are in a workflow state (Awaiting Approval) with the new (QA) publishing target assigned appear with a notification to let you know which preview publishing targets the specific item can be published to.

Workflow State in QA

Happy Coding!

👋 Hey Sitecore Enthusiasts!

Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.

What’s in it for you?

  • Stay up-to-date with the latest Sitecore news
  • New to Sitecore? Learn tips and tricks to help you navigate this powerful tool
  • Sitecore pro? Expand your skill set and discover troubleshooting tips
  • Browse open careers and opportunities
  • Get a chance to be featured in upcoming editions
  • Learn our secret handshake
  • And more!
Sitecore Snack a newsletter by Fishtank Consulting