Recommendations for your portal-ext.properties

Hi guys, I would like to share some important recommendations for your  portal-ext.properties files.

 

First, you must remember the order for the overwrite properties. Liferay loads the values of the properties defined in the portal.properties file (inside the portal-impl.jar), next overwrite 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.

 

Recommendations:

  • Always read the portal.properties (inside the portal-impl.jar), so you can know what behaviors you can control changing the values of different properties. 
  • If you are doing upgrades of liferay version please compare the portal.properties of your actual version with the version of your upgrade, for example from 6.1 to 6.2 there are some properties new in 6.2 and some properties that don’t exists in 6.2 but exists in 6.1

http://docs.liferay.com/portal/6.1/propertiesdoc/portal.properties.html

http://docs.liferay.com/portal/6.2/propertiesdoc/portal.properties.html

for example mobile.device.styling.wap.enabled does not exists in 6.1, please take your time to check the properties when you work doing upgrades.

  • Please use only the portal-ext.properties file, always after install your environment, please rename the portal-setup-wizard.properties to portal-ext.properties, if you have those files, please take the properties inside the portal-setup-wizard.properties and paste inside the portal-ext.properties (check the properties, must be unique in the file)  and then delete the portal-setup-wizard.properties file.
  • You should be ordered with the contents of file portal-ext.properties, a best practice is copy with the comments from portal.properties and use the value that you need, please don’t forget to copy with the comments, you are not the only one that is going to read the portal-ext.properties.
  • If you are working with cluster, please define everything on the portal-ext.properties and not in the database (Server Administration), for example, may need to use different mail servers for every node, and the only way to do it, is using portal-ext.properties with different values per node (mail server connection), if you define the connection on the database (Server Administration) all your nodes are going to use the same SMTP server, don’t forgot this recommendation when you work with cluster.

 

 

I hope this article help you with one of the most important files in your Liferay Portal.

 

If you have any questions please leave a comment

 

Nelson Aguayo.

Blogues
Excuse me,
may i have a question? just a few minutes...
i don't know how to get content in the aui-scheduler-event-recorder,
i find out i can get START_DATE and END_DATE,but always can't get CONTENT..
Please help!!THANKS
Hi, This kind of question should be in the forum, I saw you already did it:
https://www.liferay.com/es/community/forums/-/message_boards/message/35319191

Keep watching that thread. Here are questions about the portal-ext.properties

Regards.
I agree with you on using the portal-ext.properties instead of the portal-setup-wizard.properties in a final installation but: ¿Shouldn't it be installed through the deploying of an ext plugin instead of creating the portal-ext manually?

I think that it is a good practice having an ext-plugin in every project even if you just need it to place the portal-ext.properties. By doing this, if in the future an ext plugin is really neeeded to overwrite anything from the core (to fix a know bug for example) the manually portal-ext won't be overwritten by error.

What do you think about this approach?