• Not Answered

Sitecore 8.0: how to setup a website which runs from master database?

I wanted to setup a website that pulls the data as well as the presentation details from the master database similar to viewing a site in the Preview interface.


I followed the steps mentioned in the http://firebreaksice.com/how-to-setup-a-sitecore-preview-site-to-review-content-before-publishing/ .



  • Added the preview host to the existing IIS Sitecore instance
  • Added entry in host file for new site.
  • Added a new <site> node to the Sitecore instance’s web.config
  • Set the new site to listen to the master database

Attributes on the new preview node :

  • Load content from the master database: database="master"
  • Set a hostName to bind to: hostName="hoganlovells"
  • Don’t filter items which preserves some basic item restrictions: filterItems="false"
  • Enable workflow: enableWorkflow="true"
  • htmlCacheSize="0"

Doing these changes, there are a few pages wherein the content is being pulled from master database and on rest of the pages, data is being pulled from web db only.


When we debug, we are getting Sitecore.Context.Database as master always, but the Sitecore.Context.Item from web db sometimes  i.e. in some cases the item is from web and in other cases, item is from master.




3 Replies

  • Hi Jagmeet,

    I am not sure why you are creating/following these steps if you just need to get the site from master db only.

    Why don't you make a new binding and add new site under <sites> section with hostname of newly created binding and update the database="master" it will always show you website from master db not from web.

    Please let me know if I misunderstood the requirement.
  • Below steps need to perform :

    1. Open Connectionstring.config file

    2. Remove "Web" database name

    3. make a duplicate of " master" setting & change name attribute "Web"

  • Thanks and for the help. Issue is resolved. There was some problem in serach query in pipeline because of which the every time item is from web.