Site imports
Bring an existing WordPress site in: create an import, install its plugin on the old site, then start it. The last two endpoints are the plugin’s own.
Reading needs Read only and changes need Manage, unless an endpoint says otherwise. How to read this page.
GET /api/imports
Section titled “GET /api/imports”List the imports, newest first, with their status and progress.
- Level: Read only
- Returns:
{items: ImportSummaryDto[]}
POST /api/imports
Section titled “POST /api/imports”Start an import: the old site connects with the plugin it hands out.
- Level: Manage
- Input:
{sourceUrl?, allowHttp?: false} - Returns:
201 ImportDto
GET /api/imports/:id
Section titled “GET /api/imports/:id”One import in full: the old site’s report, its warnings and what Confirm starts with.
- Level: Manage. It quotes the settings in the old site’s wp-config.php
- Returns:
ImportDto
GET /api/imports/:id/plugin
Section titled “GET /api/imports/:id/plugin”Download the import’s migration plugin, to install on the old site.
A zip file: the plugin with this import’s connection file in it.
- Level: Manage. It holds the token that lets whoever has it pull the old site
- Notes: Not over MCP
- Returns:
application/zip
GET /api/imports/:id/code
Section titled “GET /api/imports/:id/code”The panel address and connection code, for the plugin’s form when it came without its connection file.
- Level: Manage. The code is the token that lets whoever has it pull the old site
- Notes: Not over MCP
- Returns:
ImportConnectionCodeDto
POST /api/imports/:id/run
Section titled “POST /api/imports/:id/run”Start pulling the site, with the choices of the Confirm step.
- Level: Manage
- Notes: Job
- Input:
{title, slug, serverId?, phpVersion?, carryConstants?, deactivatePlugins?, removeDropins?, removeMuPlugins?, rewritePaths?: true}
POST /api/imports/:id/retry
Section titled “POST /api/imports/:id/retry”Go on with a stopped import: the pull from where it stopped, or the set-up.
- Level: Manage
- Notes: Job
POST /api/imports/:id/refresh
Section titled “POST /api/imports/:id/refresh”Pull a finished import’s database and changed files again, with the old site in maintenance.
- Level: Manage
- Notes: Job · Destructive
POST /api/imports/:id/disconnect
Section titled “POST /api/imports/:id/disconnect”Stop the old site’s plugin answering this import.
- Level: Manage
- Returns:
ImportDto
DELETE /api/imports/:id
Section titled “DELETE /api/imports/:id”Delete an import that is not running; the site it made stays.
- Level: Manage
- Notes: Destructive
- Returns:
204
POST /api/migrate/connect
Section titled “POST /api/migrate/connect”The plugin reports the old site; its import’s token goes in X-WPL7-Import-Token.
- Level: No key
- Notes: Not over MCP
- Input:
the report (docs/internal/import-protocol.md)
GET /api/migrate/status
Section titled “GET /api/migrate/status”The plugin reads the import’s progress, with the same header.
- Level: No key
- Notes: Not over MCP
- Returns:
MigrateStatusDto