Download the PHP package wp-php-toolkit/data-liberation without Composer
On this page you can find all versions of the php package wp-php-toolkit/data-liberation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wp-php-toolkit/data-liberation
More information about wp-php-toolkit/data-liberation
Files in wp-php-toolkit/data-liberation
Package data-liberation
Short Description Data Liberation component for WordPress.
License GPL-2.0-or-later
Homepage https://wordpress.github.io/php-toolkit/reference/dataliberation.html
Informations about the package data-liberation
slug: dataliberation title: DataLiberation install: wp-php-toolkit/data-liberation
see_also:
- ../learn/03-importing-content.html | Tutorial — Markdown to WXR | The chapter that walks through importing a folder of Markdown files into WordPress via the toolkit.
- markdown | Markdown | Use Markdown as a source or destination format.
- blockparser | BlockParser | Analyze serialized blocks inside post content.
-
httpclient | HttpClient | Download media and remote source data while importing.
Streaming WordPress import/export. WXR, SQL, block markup — process entities one at a time instead of building whole-dataset object graphs.
Why this exists
WordPress content should be portable, but real migrations cross several formats. A site export might arrive as WXR, a Markdown folder, or entities from another CMS. URLs can hide in block attributes, HTML, CSS, feeds, GUIDs, and post meta. Importers must also resume after a failed media download or upload.
The DataLiberation component streams WordPress-shaped data through readers, transformers, and writers. It models posts, terms, comments, attachments, and metadata as ImportEntity objects, then lets a pipeline rewrite each entity without loading the full export into memory.
The API reflects specific migration bugs: relative URLs in known block attributes, URLs inside inline CSS, self-closing block comments that must keep their shape, and origin-only URLs whose trailing slash style should not change during a rewrite.
Reach for it when the job combines formats: build WXR from another CMS, rewrite a staging export for production, frontload remote assets, or compose Markdown, XML, HTML, CSS, and URL rewriting into one pipeline.
Write a WXR file in five lines
Stream a single post into a WXR document via WXRWriter. The writer emits each entity to the output stream and only keeps the small amount of state needed for the current document.
Build a WXR programmatically from any source
The writer doesn't care where entities come from. Loop over rows from a CMS, a CSV, or a Notion API dump and emit posts plus their meta and comments.
Read entities from a WXR file incrementally
WXREntityReader emits one entity at a time. Memory use is driven by the current entity and parser buffers rather than the total file size.
Streaming transform: rewrite URLs while copying WXR
Wire reader to writer to rewrite a WXR file on the fly. This pattern is how you migrate a staging export to production: swap staging.example.com for example.com while holding only the current entity and output buffers.
Render Markdown into a WXR import in one pipeline
Compose MarkdownConsumer with WXRWriter to publish a folder of Markdown directly as a WordPress import file.
All versions of data-liberation with dependencies
wp-php-toolkit/bytestream Version ^0.8.1
wp-php-toolkit/filesystem Version ^0.8.1
wp-php-toolkit/html Version ^0.8.1
wp-php-toolkit/http-client Version ^0.8.1
wp-php-toolkit/xml Version ^0.8.1