Create a publishing target
A publishing target consists of a database and a publishing target definition item that specifies that database. Sitecore publishes from the Master database to one or more publishing target databases. The Master database contains all versions of all data, including unapproved content changes.
The default publishing target, Internet, references the database named Web, but you can create additional publishing targets.
Reasons to create additional publishing targets include:
-
Geographic distribution: you can publish all content to multiple publishing targets on content delivery servers in multiple locations.
-
You want to publish to a preview publishing target before publishing to your live site.
To create a publishing target:
-
Deploy a new database, for example by using the
Webdatabase from the installation package for your version of Sitecore. -
In the
ConnectionStrings.configfile on your CM server, add an entry similar to this:NoteTo use the database for content delivery instead of preview, add a connection on your CD server.
-
Create a configuration patch file similar to this (the settings are in the
Sitecore.configfile): -
If you need a search index for the new database, copy the one for
sitecore_web_indexin theApp_Config\Sitecore\ContentSearch\Sitecore.ContentSearch.Solr.Index.Web.config, and change it so that the crawler uses the new database. You must also change the index update strategy to get data from the new database. -
To create a new index update strategy, copy the existing
onPublishEndAysncorOnPublishEndAsyncSingleInstanceindex update strategy, give it a new name, for example,onPublishToPreviewEndAsync, and change the database parameter of the strategy to the name of the publishing target.