Database storage of configurations

IMPORTANT: Once you turn on database storage, you cannot use Continuous delivery. You can only get back to FileSystem storage mode by migrating the configurations back. For more information, see Migrate configurations.

Sitefinity CMS configurations are stored in .config files. By default, these files are located in folder ~/App_Data/Sitefinity/Configuration/. You can store the configurations of different servers in the database. This way, all servers will use the same configurations. 

PREREQUISITES:
  • If you are moving the configurations of more than one instance to a common database, you must ensure that prior to the move, all configurations of different instances are the same.
  • Database storage for configuration files can be turned on only for existing projects. New projects have to be created and initialized first, before proceeding with the instructions below.

NOTE: When you add or delete a language on your site, the changes are persisted on the file system, regardless the storage mode that you have configured. The changes are saved in the ResourceConfig file.
This is because languages are part of the building of the metadata source for connecting to the database. In addition, changing the languages changes the database structure and all structural changes are transferred through the deployment package 

To turn on database storage for configuration files, perform the following:

  1. Open you web.config file.
  2. Perform the following transformations:
  3. Perform procedure Administration: Move the database connection string in the web.config file.
  4. Save and close the web.config and restart the application.
    The storage of configuration files is moved to the database. The existing configurations are taken as default. The files in ~/App_Data/Sitefinity/Configuration folder are made read-only and any future changes to the .config files are written to the database where each server can access them.

IMPORTANT: You must not remove existing configuration files from the project's ~/App_Data/Sitefinity/Configuration folder, because Sitefinity CMS continues to use them to read the default values. Only new changes are written to the database.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?