Search by

wp-php-toolkit / reprint-server

AZielinski

Streaming export engine used by the Reprint Server WordPress plugin

Package info

github.com/wp-php-toolkit/reprint-server

pkg:composer/wp-php-toolkit/reprint-server

Statistics

Installs: 198 273

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v0.11.6 2026-11-03 16:22 UTC

README

Composer package for the Reprint streaming export engine — the HTTP endpoint installed on the WordPress host that Reprint clients pull from and push to.

This package was previously published as wp-php-toolkit/reprint-exporter. It replaces that package (replace: self.version), so the two names cannot be installed side by side. Consumers should require wp-php-toolkit/reprint-server directly.

Loading it

Composer's classmap covers every canonical class in src/, so classes resolve after requiring vendor/autoload.php.

Shared helpers are static methods on WordPress\Reprint\Server\Utils, which the classmap covers like any other class. Every server file, src/export.php included, expects that autoloader to be registered before it is required; nothing loads class-utils.php by path.

The Reprint Server plugin loads src/compat.php when it opens the server runtime so that released Site_Export_* server names continue to resolve without adding work to every request which loads the shared Composer autoloader.

Standalone consumers which request a released server name before its canonical class must explicitly require src/compat.php after Composer's autoloader.

src/export.php never autoloads, and that is deliberate. It declares functions rather than classes, so the classmap scan finds nothing in it to register. Keep it that way: requiring the file starts an output buffer and installs error, exception and shutdown handlers, all of which belong at dispatch time. WordPress\Reprint\Server\HTTPServer::serve() requires it at the right moment. Adding a class to export.php would make it autoloadable and break that.

Server classes use the WordPress\Reprint\Server namespace. The released Site_Export_* server names remain autoloadable aliases. The global Site_Export_HMAC_Client name and file remain unchanged because the Reprint client package consumes that class directly.

Development

This repository is a read-only Composer package split from the Reprint monorepo. It is published so Composer can install wp-php-toolkit/reprint-server directly.

Do not propose changes in this package repository. Open issues and pull requests against the source repository instead:

https://github.com/WordPress/reprint

The package repository is overwritten from packages/reprint-server in the monorepo during releases, so direct changes here will be lost.

Preflight reports WordPress roots found under the requested directory paths, but does not load PHP from those paths. A standalone host route that needs WordPress metadata must define ABSPATH to its configured WordPress root or load WordPress before serving the request. When get_option() is already available, preflight uses that running WordPress instance.