Skip to main content

Plone Logo

Plone Content Export and Import

Package supporting the export and import of content, principals, relations, translations, discussions, and redirects from and to a Plone site.

Introduction

This package is a slimmer version of the awesome collective.exportimport.

While collective.exportimport supports older Plone versions and Python 2, and also takes care of data conversion from Archetypes to Dexterity, this package focuses only on latest Plone and Python.

Documentation

plone.exportimport documentation

REST API Endpoints

This package provides REST API endpoints for exporting and importing site data via HTTP requests.

Export Endpoint

Export site data as a ZIP file.

Endpoint: POST /plone/@export

Permission: plone.exportimport.export (granted to Site Administrators by default)

Response: ZIP file containing all exported data (content, principals, relations, translations, discussions, redirects, portlets)

Example:

curl -X POST \
  -H "Authorization: Bearer <token>" \
  https://plone.example.com/plone/++api++/@export \
  -o export.zip

Import Endpoint

Import site data from a ZIP file.

Endpoint: POST /plone/@import

Permission: plone.exportimport.import (granted to Site Administrators by default)

Request: Multipart form data with file field containing the ZIP file

Response: JSON object with status and import report

Example:

curl \
  -H "Authorization: Bearer <token>" \
  -F "file=@export.zip" \
  https://plone.example.com/plone/++api++/@import

Response Example:

{
  "status": "success",
  "report": ["Principals imported: 5 principals", "Content imported: 12 items", "Relations imported: 3 relations", "..."]
}

Installation

If plone.exportimport is not yet available in your Plone installation, add it using pip.

pip install plone.exportimport

Contributing

See Contributing to Plone and [Contribute to Plone 6 core](Contribute to Plone 6 core) for general contributing policies and guidance.

The following sections specifically describe how to develop and contribute to plone.exportimport.

Setup

You need a working Python environment version 3.8 or later.

Install the dependencies and a development instance using the following command.

make install

Local environment Plone server

Start Plone, on port 8080, with the following command.

make start

Format code base

Format the code base with the following command.

make format

Run tests

Testing of this package is done with pytest and tox.

Run all tests with the following command.

make test

Run all tests, but stop on the first error and open a pdb session.

./bin/tox -e test -- -x --pdb

Run tests named TestUtilsDiscussions.

./bin/tox -e test -- -k TestUtilsDiscussions

License

The project is licensed under the GPLv2.

Changelog

2.2.0 (2026-10-01)

New features

  • Add --path and --paths options to plone-exporter to export only parts of a site. Relations, translations, discussions, portlets and redirects are limited to the exported content @ericof #86

Bug fixes

  • Do not fail exporting content whose language is None. Such an item serializes to "language": null, and fix_language raised AttributeError: 'NoneType' object has no attribute 'get'. It is now treated like a missing language and gets the default-language placeholder, which the importer resolves. @kunalKumar-13 #95
  • Fixed export and import of grid blocks whose images have no image_scales information. @ericof #109
  • Fixed plone-exporter silently skipping fields protected by a read permission not granted to the Manager role, such as behavior fields on the Plone Site root. Both command line tools now run with the site hook set and without overriding the roles of the system user. @ericof #110
  • Do not silently drop file and image fields on import when a blob's file name has another Unicode normalization form on disk. Blob files are now exported under a normalized file name (NFC, without path separators or characters invalid on Windows), the import also finds the NFC form of a recorded blob path, and items that could not be fully deserialized are listed as imported with errors, making plone-importer exit with status 1 @ericof #114

Internal

  • Declared plone.autoform, plone.behavior, plone.supermodel and Products.GenericSetup as dependencies. @ericof

Tests

  • Fix intermittent failure of the services export/import roundtrip test, which compared ZIP archives including file timestamps @ericof
  • Fixed test isolation with pytest-plone 1.1.0 by keeping importers and fixtures from committing transactions during tests. @ericof

2.1.0 (2026-09-10)

New features

  • Make it easy to customize which content gets exported @gforcada #86

2.0.2 (2026-08-21)

Internal

  • Update configuration files @plone

2.0.1 (2026-05-19)

Bug fixes

  • Reset per-setter progress counter in ContentImporter so {setter}: Handled N items... reports the items handled by that setter instead of a cumulative count carried over from the previous setter. @ericof #92

Internal

  • Remove Python 3.8/3.9 compatibility imports for type hints. @mauritsvanrees
  • Update configuration files @plone

2.0.0 (2026-05-16)

Internal:

  • Make final release, no further changes.

2.0.0a2 (2026-02-09)

New features:

  • Add @export and @import REST API services. @davisagli #87

Bug fixes:

  • Fix an issue with plone.exportimport.utils.content.import_helpers.get_parent_from_item that would not return the parent of a Plone Site during functional tests. @ericof

2.0.0a1 (2025-11-26)

Breaking changes:

  • Replace pkg_resources namespace with PEP 420 native namespace. Support only Plone 6.2 and Python 3.10+. #3928

1.3.1 (2025-10-06)

New features:

  • Implement regular commits to reduce memory usage in larger import processes. @ericof #55

Internal:

  • Add a prefix to progress loggers. @ericof
  • Fix type annotations. @ericof
  • Import: Move plone.importer.principals to the top of the importers to be processed. @ericof

1.3.0 (2025-09-24)

New features:

  • Support export/import of user login_name @ewohnlich #69

Bug fixes:

  • Fix import of ordering inside folderish components. @ericof #60

Internal:

  • Update package metadata @ericof #78

1.2.1 (2025-09-05)

Bug fixes:

  • Fix export of remoteUrl to an internal page keeping the site url in the exported data. @ericof #73

1.2.0 (2025-08-14)

New features:

  • Support non-root PloneSite import/export [ewohnlich] #67

Bug fixes:

  • Export all paths in Posix format to support export-import across platforms [ewohnlich] #66

1.1.1 (2025-06-26)

Bug fixes:

  • Fix error getting parent object on Windows. @ewohnlich #64

1.1.0 (2025-03-11)

New features:

  • Report object creation during import using the plone-importer cli. Use --quiet to disable it. @ericof #54
  • Do not stop the import if an object parent is missing @ericof #56

Bug fixes:

  • Set site during plone-importer transaction commit. @ericof #52
  • Sort relations.json and translations.json so their contents are stable. @mauritsvanrees #57

1.0.0 (2025-01-31)

Bug fixes:

  • Export the raw value of rich text fields, instead of the transformed output. This fixes internal links in Classic UI based distributions. @mauritsvanrees #48
  • Fix traceback when translation group does not have the default language. @mauritsvanrees #50

Documentation:

1.0.0b1 (2025-01-23)

New features:

  • Include revisions only when passing --include-revisions. @mauritsvanrees #39

Bug fixes:

  • Export principals: sort groups, roles, and members. @mauritsvanrees #39
  • Import: update modification dates again at the end. The original modification dates may have changed. @mauritsvanrees #39
  • Do not export parent info. This information is no longer needed: during import, parents are now always found by path and not by UID. From now on, the import ignores any parent info that is set. @mauritsvanrees #39

1.0.0a8 (2024-10-11)

Bug fixes:

  • Use plone.app.discussion and plone.app.multilingual as optional dependencies. @davisagli #18
  • Include 'isReferencing' relations in import. @ksuess #32
  • Set constraints after setting local permissions on content [@ericof] #33
  • Export adds a newline at the end of all files. This matches the .editorconfig settings that we have in most Plone packages. [maurits] #35
  • Do not export or import translations when plone.app.multilingual is not available. [maurits] #35
  • Disallowlisted portlets were not imported when there was no accompanying change in the actual portlet list. [maurits] #35
  • Add a fixer for the allow_discussion key: this should only contain True or False when this is explicitly set on the object. [maurits] #35
  • Do not export or import discussions/comments when plone.app.discussion is not available. [maurits] #35
  • Renamed blacklisted_status key to blocked_status to be sensitive. We still read the old key for backwards compatibility. [maurits] #35

1.0.0a7 (2024-06-13)

New features:

  • Export / Import local permissions for each content [@ericof] #15

Bug fixes:

  • Fix plone.exportimport.utils.principals.members._run_as_manager function [@ericof] #29

1.0.0a6 (2024-06-10)

Bug fixes:

  • Allow granting roles other than Manager and Member to principals [@ericof] #25
  • Fix export of language for content [@sneridagh] #26

1.0.0a5 (2024-05-16)

Internal:

  • Fix list of test dependencies [@ericof]

1.0.0a4 (2024-05-15)

New features:

  • Add pre_deserialize_hooks to content import [@pbauer] #22

Bug fixes:

  • Reindex members of relations in case that they contain preview_image_links [sneridagh] #13
  • Avoid duplicating portlets registration during import [@ericof] #16

Internal:

  • Update plone/meta [@ericof] #20

1.0.0a3 (2024-05-02)

Bug fixes:

  • Fix importer by issuing a transaction commit [sneridagh] #9
  • Account for use case language is empty string [sneridagh] #10

1.0.0a2 (2024-04-18)

New features:

  • Support export/import of portlets if plone.app.portlets is installed. @davisagli #8

1.0.0a1 (2024-04-17)

New features:

  • Implement exporter and importer for content [@ericof] #1
  • Implement exporter and importer for members and groups [@ericof] #2
  • Implement exporter and importer for redirects [@ericof] #3
  • Implement exporter and importer for relations [@ericof] #4
  • Implement exporter and importer for translations [@ericof] #5
  • Implement exporter and importer for discussions [@ericof] #6

Metadata

Release files for plone.exportimport 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plone.exportimport 2.2.0
File Size Uploaded
plone_exportimport-2.2.0.tar.gz 220.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plone.exportimport 2.2.0
File Interpreter ABI Platform
plone_exportimport-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 300.0 kB

Release files / plone_exportimport-2.2.0.tar.gz

Download URL plone_exportimport-2.2.0.tar.gz
Size 220.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bfee2b85b45b2a85d4c5ae65db450543684b4766cfb52af51e57c6adaed5dad2
BLAKE2b-256 checksum
How to use checksums
85b942d0cb11f8f09738da6499f09dd767792cc419221000ebb255903367e004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / plone_exportimport-2.2.0-py3-none-any.whl

Download URL plone_exportimport-2.2.0-py3-none-any.whl
Size 79.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f71ca075dd106e69564a86d551f4e13ddafabd9850dffbf96e8f21980701f683
BLAKE2b-256 checksum
How to use checksums
51f87f2578b16f9e213c94fac8afadb662c1c3d17459e13b840970f48f6a6bc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page