Free cookie consent management tool by TermsFeed Generator
All Products & Integrations

jalpi page builder docs

Import / Export

Every import and export path in the plugin, and what each one actually accepts.

Jalpi CoreDeveloper
3 min read Β· November 2026

Jalpi has four import paths and three export paths. All of them are JSON β€” there is no ZIP handling, no XML and no HTML import anywhere in the codebase.

The paths#

PathDirectionEndpoint / mechanismCapability
Template exportOutGET /templates/{id}/exportedit_posts
Template importInPOST /templates/import β€” { json, name? }edit_posts / publish_posts
Class exportOutGET /classes/export β†’ { version, classes }edit_posts
Class importInPOST /classes/import β€” { classes, conflict_strategy }edit_posts
Design System exportOutGET /design-systemmanage_options
Design System importInPOST /design-system, or store.dsImportJSON() in the editormanage_options
Website kit importInPOST /import-website β€” { website_id }manage_options
Bundled template seedInPOST /templates/seed-bundled β€” { force }edit_posts

Templates#

Import takes a JSON string, not an object:

await apiFetch(`${base}/templates/import`, {
  method: 'POST',
  body: JSON.stringify({ json: fileContentsAsString, name: 'My Template' }),
});

sanitize_template_data() routes by declared type: a page payload through Jalpi_Sanitizer::sanitize_page_data(), a section or element payload through sanitize_node(). A payload whose type is unknown, or whose nodes are all rejected, produces an empty template rather than an error.

Classes#

Class import takes an array of JalpiClass objects plus a conflict strategy:

StrategyOn a name collision
skip (default)Leave the existing class untouched
overwriteReplace the existing class’s definition
duplicateCreate a new class with a -2, -3… suffixed name

The response is { created, updated, skipped }. Every imported definition passes through Jalpi_Sanitizer::sanitize_class_definition(), and each write bumps the class version so page render caches are invalidated.

Website kits#

Kit import reads a file that is already inside the plugin directory β€” nothing is uploaded. The id is sanitize_key()ed and explicitly checked for / and \ before the path is built.

To ship your own kit, drop a JSON file into websites/. Jalpi_Kit_Templates::load_kits() picks up any *.json there that has both an id and a pages array, so it appears in the Template Library immediately, and import_website() can install it.

Use the current page shape β€” { title, slug, is_front, canvas_data } β€” rather than the older { id, slug, name } shape still used by itservices.json, or every imported page will be titled β€œPage”.

Assets#

Image handling differs by path:

  • Templates and classes β€” image URLs are stored as strings and exported as strings. Nothing is copied. A template moved between sites keeps pointing at the original site’s media.
  • Website kits β€” kit JSON references images by URL. WooCommerce product images are the exception: Jalpi_Woo::sideload_image() pulls them into the media library during a product seed.
  • Editor uploads β€” POST /media/upload sniffs the real MIME with finfo and accepts only JPEG, PNG, GIF, WebP and AVIF.

Important

  • Exported templates and classes contain image URLs, not images. Importing into a different site produces working layout with broken image references unless you migrate the media separately.
Source

Files

includes/class-jalpi-templates.php includes/class-jalpi-classes-api.php includes/class-jalpi-api.php includes/class-jalpi-class-manager.php includes/class-jalpi-woo.php

Classes

Jalpi_Templates Jalpi_Classes_API Jalpi_Class_Manager Jalpi_API Jalpi_Woo

Functions

export_template import_template sanitize_template_data export_all import import_website sideload_image