8

I need to run my front-end website by pointing to master database, temporarily.

What settings should I change to achieve this?

17

The settings are: database=master, filterItems=true and enableWorflow=true.

There is an example patch file included in App_Config/Include named LiveMode.config.example.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sites>
      <site name="website">
        <patch:attribute name="database">master</patch:attribute>
        <patch:attribute name="filterItems">true</patch:attribute>
        <patch:attribute name="enableWorkflow">true</patch:attribute>
      </site>
    </sites>
  </sitecore>
</configuration>

Match the site name ('website' in this example') to the corresponding site name to enable Live Mode for. You can rename the included LiveMode.config.example file to LiveMode.config to enable the patch or make the changes to the site node definition for your local development environment.

4

The answer from @bmyers is the recommended solution, but it is also possible to update the web connectionstring and point it directly to the master database:

<add name="web" connectionString="user id=sa;password=Password01;Data Source=.;Database=MySiteSitecore_Master"/>

The above is useful in CI type environments when you need to quickly change variables at deploy time for testing purposes.

1
  • Isn't this quite dangerous? If someone decides to publish the entire site while web is pointing to master, unpublished content and item versions could be deleted. – Mark Lowe Dec 6 '19 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.