Liferay 7 properties files

At startup Liferay reads some properties files.

Liferay loads the values of the properties defined in the portal.properties file (inside the portal-impl.jar),then overwrites with the values of the properties in portal-bundles.properties, then overwrites with the values of the properties in portal-ext.properties, then overwrites with the values of portal-setup-wizard.properties, and finally overwrite with the values in the database. Each file is first read in the classpath dir ${liferay.home}\tomcat-8.0.32\webapps\ROOT\WEB-INF\classes and then in the ${liferay.home} dir.

This is clearly indicated in the portal.properties(inside the portal-impl.jar).

# The default read order is: portal.properties, portal-bundle.properties,
 # portal-ext.properties, and then portal-setup-wizard.properties.
 #
 include-and-override=portal-bundle.properties
 include-and-override=${liferay.home}/portal-bundle.properties
 include-and-override=portal-ext.properties
 include-and-override=${liferay.home}/portal-ext.properties
 include-and-override=portal-setup-wizard.properties
 include-and-override=${liferay.home}/portal-setup-wizard.properties

Things to remember:

    • portal.properties inside portal-impl.jar are different from the various versions of liferay so please take a carefull look when you upgrade
    • The file portal-setup-wizard.properties should always be renamed to portal-ext.properties after first install and run. If they are both present take the properties inside the portal-setup-wizard.properties and merge them inside the portal-ext.properties
    • These properties file are the best place where to store properties in case of a cluster installation because you can have different configuration for each node. Database configuration is centralized so it won’t allow custom configuration on a node-basis.

Leave a Reply

Your email address will not be published. Required fields are marked *