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.

Tip

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 (Site Menu), expand Design, and go to Fragments.

Exporting Fragment Sets (.zip)

Fragment sets include all their fragments when exported.

  1. Click Fragments Set Options (Options) next to Fragment Sets (1).

  2. Select the sets to export.

  3. Click Export. The file downloads automatically.

To export a single set,

  1. Open the fragment set and click Fragment Set Options (Options) next to the set’s name (2).

  2. Select Export. The file downloads automatically.

Exported fragment set files use the format collections-xxxxxxx.zip.

Export fragment sets individually or in bulk.

Exporting Individual Fragments (.zip)

Fragments can be exported individually or in bulk. To export a single fragment,

  1. Select the fragment set.

  2. Click Actions (Actions icon) on the fragment card (1).

  3. Select Export. The file downloads automatically.

To export multiple fragments,

  1. Select multiple fragments using the checkboxes on the fragment cards, or select all using the checkbox above the list.

  2. Click Export in the toolbar. The file downloads automatically.

Exported fragment files use the format entries-xxxxxxx.zip.

Export fragments individually or in bulk.

Importing Fragments (.zip)

  1. Open the Site Menu (Site Menu), expand Design, and go to Fragments.

  2. Click Fragment Set Options (Options) next to Fragment Sets (1) and select Import.

  3. 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,

  1. Select the target set.

  2. Click Fragments Set Options (Options) next to its name (2).

  3. Select Import and upload the ZIP file.

  4. Click Import.

Import fragments and fragment sets.

Exporting and Importing Fragments (.lar)

  1. Open the Site Menu (Site Menu), expand Design, and go to Fragments.

  2. Click Options (Options icon) in the toolbar and select Export/Import.

  3. Select the Export or Import tab to begin.

Export and Import fragments and fragment sets in .lar format.

Exporting Fragments (.lar)

To export fragments and fragment sets,

  1. Go to the Export tab and click New Export Process. Then configure the settings below.

Export Settings

SettingDescription
Application SettingsIncludes fragment settings.
Date RangeAll: Export all fragments.
Date Range: Specify start and end dates.
Last…: Export fragments from a recent period (e.g., last 48 hours).
Content SelectionShows the number of fragment entries. If you deselect this option, no entries are exported.
DeletionsInclude deletions made within the selected period.
PermissionsExport 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,

  1. Go to the Import tab and click New Import Process.

  2. Upload the .lar file using the file picker or by dragging it into the designated area.

  3. Click Continue, then configure the settings below.

Import Settings

SettingDescription
ApplicationIncludes fragment setup.
ContentDisplays the number of entries to import. If you deselect this option, no entries are imported.
DeletionsDelete Application Data Before Importing: Clears all existing fragment data.
Replicate Individual Deletions: Reproduces delete actions from the export file.
PermissionsImport Permissions: Includes assigned permissions from the export file.
Update DataMirror: 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 ContentUse 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.
Tip

Copying data as new may cause issues due to duplicated external reference codes.

Click Import to complete the process.

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy