Changing dotCMS Configuration Properties - Documentation topics on: configuration,configuration properties,.

Changing dotCMS Configuration Properties

Configuration File Names and Locations

The main dotCMS configuration properties are specified in the dotmarketing-config.properties file. Properties related to cluster configuration are specified in the dotcms-config-cluster.properties file. Both of these files are stored in the following directory in your dotCMS installation:

/dotserver/tomcat-X.x/webapps/ROOT/WEB-INF/classes/

However, it's very important that both of these files must be overridden in a plugin to prevent overwriting your changes during later dotCMS upgrades.

Overriding Configuration Properties

To override the configuration properties, you must do both of the following:

Edit the Properties Extension File

The properties extension files are found in the plugins/com.dotcms.config/conf directory of your dotCMS installation. The name of each extension file is the same as the name of the source properties file, with -ext added to the file name (before the file extension), so the extension file to edit depends on the types of properties you wish to change.

Main Configuration Properties

To override a configuration property in the dotmarketing-config.properties source file via a static configuration plugin, perform the following steps:

  1. Edit the extension file dotmarketing-config-ext.properties.
  2. Copy the property that you would like to change from the source file (dotmarketing-config.properties).
  3. Paste the property into the extension file, and change the property setting to the new value.
  4. Save the extension file.

Cluster Configuration Properties

To over-ride a configuration property in the dotcms-config-cluster.properties source file via a static configuration plugin, perform the following steps:

  1. Edit the extension file dotcms-config-cluster-ext.properties.
  2. Copy the property that you would like to change from the source file (dotcms-config-cluster.properties).
  3. Paste the property into the extension file, and change the property setting to the new value.
  4. Save the extension file.

Important: The property names are both case sensitive and sensitive to spaces. So you must make sure the property name (everything before the equals sign) in the properties extension file exactly matches the property name in the base properties file. Case mismatches or extra spaces will prevent the new property value from being used.

Deploy dotCMS Plugins

After you have made all configuration changes, you must deploy your dotCMS plugins:

  1. Shut down dotCMS.
    ./bin/shutdown.sh
    
  2. Deploy your dotCMS plugins.
    • From the root of your dotCMS installation, run the following command:
      ./bin/deploy-plugins.sh
      
  3. Restart dotCMS.
    ./bin/startup.sh
    

The changes made in your properties extension files will now override the identically named properties in your dotmarketing-config.properties and dotcms-config-cluster.properties source files. When you upgrade dotCMS, you need only copy your plugins folder and re-deploy your plugins to restore your modified configuration.

Removing Property Changes

To remove the property changes and restore dotCMS config properies to their original settings, do the following:

  1. Shut down dotCMS.
    ./bin/shutdown.sh
    
  2. Undeploy your dotCMS plugins.
    • From the root of your dotCMS installation, run the following command:
      ./bin/undeploy-plugins.sh
      
  3. Restart dotCMS.
    ./bin/startup.sh