Removing Sample Document Types in the Documents and Media Repository


This article describes how to remove the default "Document Types" from the Documents and Media portlet. These sample Document Types are created when Liferay DXP 7.0 is started for the first time. These exist so that document creators and reviewers can leverage specific metadata fields for each document in the Documents and Media repository. For example, the Contracts Document Type offers customized fields, such as Legal Reviewer and Effective Date.

The use case is when site administrators want to delete the sample data and keep only those they want. The sample Document Types can be deleted successfully, but the Document Types themselves are always recreated the next time the application server is ever restarted.


There is a way to prevent the default Document Types from being recreated every time the platform is started.

  1. First, delete all the unwanted Document Types.
    1. Navigate to the Control Panel → Content :→ Documents and Media
    2. Click the 3 dot icon → Document Types in the upper right corner.
    3. Click the 3-dot icon → Delete.
  2. Second, navigate to the Control Panel → Configuration → System Settings.
  3. Click the Collaboration tab.
  4. Click Documents & Media Service.
  5. Uncheck the Add Default Structures checkbox.
  6. Click Save.

At this point, the Document Types have been deleted and cannot be restored in the Recycle Bin.


If the application server is ever restarted, the Document Types are not recreated. To add them back, reverse the process by checking the Add Default Structures then restart the application server.

0 人中有 0 人觉得有帮助