strapi-plugin-import-export-v5
v1.0.1
Published
Universal Content Import & Export Plugin for Strapi 5
Maintainers
Readme
Strapi 5 Universal Import/Export Plugin
A lightweight, high-performance, and completely schema-driven plugin for exporting and importing Content Types, Single Types, components, Dynamic Zones, relations, and media in Strapi 5.
Features
- Schema-Driven Architecture: No hardcoded content type names, relationship fields, or dynamic structure layouts.
- Dynamic Entry & Relation Matching Engine:
- Step 1: Automatically checks for schema-defined unique fields (
unique: trueortype: "uid"). - Step 2: Performs exact
documentIdmatching (crucial for same-database restorations or Local → Local syncs). - Step 3: Performs a dynamic composite scalar-field fingerprint lookup if the document ID is not found (safely handles UAT/Prod cross-environment imports without data corruption).
- Step 1: Automatically checks for schema-defined unique fields (
- Clean Two-Column Admin Dashboard: Minimalist visual separation between Import and Export cards, built using
@strapi/design-system. - Zero Third-Party Node Server Dependencies: Relies entirely on built-in Node modules for zero bundle size impact.
- Dynamic Entries Display Selector: Content editors can dynamically pick which schema field to display in selection lists.
Installation
You can install this plugin into any Strapi 5 project either as a local plugin or via a tarball.
Option A: Local Plugin Setup (Recommended for Customizations)
- Copy the
import-exportdirectory into your target Strapi project'ssrc/plugins/import-exportfolder. - Register the plugin in your target project's
config/plugins.jsfile:
module.exports = {
'import-export': {
enabled: true,
resolve: './src/plugins/import-export'
},
};- Enable the plugin in your backend server and build the admin panel:
npm run build
npm run developOption B: Local File Dependency Setup
If you prefer installing it without committing the source code inside your main repository:
- Package the plugin directory:
cd path/to/import-export
npm packThis generates a file like strapi-navnath-plugin-import-export-v5-1.0.0.tgz.
- Install the package in your target Strapi 5 project:
npm install /path/to/strapi-navnath-plugin-import-export-v5-1.0.0.tgz- Register it in
config/plugins.js:
module.exports = {
'import-export': {
enabled: true,
},
};- Build and run:
npm run build
npm run developHow It Works
The plugin dynamically interfaces with Strapi 5 schema structures at runtime:
- Model Discovery: Reads
strapi.contentTypesand filters for user-created models (api::). - Dynamic Populating: During exports, it builds recursive populate schemas depending entirely on the content model relations and component configuration.
- Data Import/Update: Processes payload items. If matching entries exist, it updates them using Strapi 5 Document Service upsert strategies. Otherwise, it creates fresh records.
License
MIT License. Feel free to customize and redistribute!
