Exporting and Importing Fragments
Export fragments from one environment and import them into another to move content, replicate setups, share fragment collections, or back up custom work.
Starting with Liferay DXP 2025.Q3+/Portal GA146+, fragments can be installed directly from Liferay Marketplace through the Page Editor or Fragments applications.
Export and Import Options
You can export and import individual fragments or fragment sets using .zip
(recommended) or .lar
files.
Exporting and Importing Fragments (.zip
)
Open the Site Menu (), expand Design, and go to Fragments.
Exporting Fragment Sets (.zip
)
Fragment sets include all their fragments when exported.
-
Click Fragments Set Options (
) next to Fragment Sets (1).
-
Select the sets to export.
-
Click Export. The file downloads automatically.
To export a single set,
-
Open the fragment set and click Fragment Set Options (
) next to the set’s name (2).
-
Select Export. The file downloads automatically.
Exported fragment set files use the format collections-xxxxxxx.zip
.
Exporting Individual Fragments (.zip
)
Fragments can be exported individually or in bulk. To export a single fragment,
-
Select the fragment set.
-
Click Actions (
) on the fragment card (1).
-
Select Export. The file downloads automatically.
To export multiple fragments,
-
Select multiple fragments using the checkboxes on the fragment cards, or select all using the checkbox above the list.
-
Click Export in the toolbar. The file downloads automatically.
Exported fragment files use the format entries-xxxxxxx.zip
.
Importing Fragments (.zip
)
-
Open the Site Menu (
), expand Design, and go to Fragments.
-
Click Fragment Set Options (
) next to Fragment Sets (1) and select Import.
-
Upload the ZIP file and click Import.
If the file contains duplicates, choose how to handle them:
- Do Not Import Existing Items
- Overwrite Existing Items
- Keep Both (Adds a number to duplicate items.)
Fragments imported this way go into the Imported fragment set.
To import fragments into a specific set,
-
Select the target set.
-
Click Fragments Set Options (
) next to its name (2).
-
Select Import and upload the ZIP file.
-
Click Import.
Exporting and Importing Fragments (.lar
)
-
Open the Site Menu (
), expand Design, and go to Fragments.
-
Click Options (
) in the toolbar and select Export/Import.
-
Select the Export or Import tab to begin.
Exporting Fragments (.lar
)
To export fragments and fragment sets,
- Go to the Export tab and click New Export Process. Then configure the settings below.
Export Settings
Setting | Description |
---|---|
Application Settings | Includes fragment settings. |
Date Range | All: Export all fragments. Date Range: Specify start and end dates. Last…: Export fragments from a recent period (e.g., last 48 hours). |
Content Selection | Shows the number of fragment entries. If you deselect this option, no entries are exported. |
Deletions | Include deletions made within the selected period. |
Permissions | Export assigned permissions if needed. |
After exporting, check the Current and Previous tab to download the .lar
file or view export history.
Exported fragment files use the format Fragments-xxxxxxx.portlet.lar
.
Importing Fragments (.lar
)
To import fragments and fragment sets,
-
Go to the Import tab and click New Import Process.
-
Upload the
.lar
file using the file picker or by dragging it into the designated area. -
Click Continue, then configure the settings below.
Import Settings
Setting | Description |
---|---|
Application | Includes fragment setup. |
Content | Displays the number of entries to import. If you deselect this option, no entries are imported. |
Deletions | Delete Application Data Before Importing: Clears all existing fragment data. Replicate Individual Deletions: Reproduces delete actions from the export file. |
Permissions | Import Permissions: Includes assigned permissions from the export file. |
Update Data | Mirror: Creates new entries on the first import and updates them on subsequent imports. Copy as New: Creates new entries with each import, regardless of existing data. |
Authorship of the Content | Use the Original Author: Keeps the original author if found; otherwise, assigns the current user. Use the Current User as Author: Assigns the current user as the author for all imported content. |
Copying data as new may cause issues due to duplicated external reference codes.
Click Import to complete the process.