Legacy Knowledge Base
Published Sep. 10, 2025

How can I tell if a portlet is being used?

Written By

Odon Barta

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • I would like to know if a portlet is being used or not in my Liferay instance
  • Our Liferay instance has many virtual hosts, each virtual host has many sites, each site with many pages
  • We cannot do the check manually by navigating trough all the page to check if the portlet is added to a page or not

Environment

  • DXP 7.0+

Resolution

  • If a portlet is used on a page, an entry is added to the PortletPreferences table in the database specifying the portlet's id (portletId column), the page's id (plid column) and the instance's id which the page is belonging to (companyId column)
  • You can gather the base portlet id of the portlets through the Gogo Shell with the following method: Retrieving Portlet IDs with the Gogo Shell
  • I'm saying "base portlet id", because in case of instanceable portlets, an instance id is added to the end of the portlet id, for example: com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_VuM6u5w3NFtW
  • Once you have the base portlet id, you can search for it in the PortletPreferences table to see on which page it is used. To get the exact page, you can do it by querying the Layout table and selecting the entries based on the companyId and plid.
Did this article resolve your issue ?

Legacy Knowledge Base