All features

Cherry Blossom feature

Updates: Migration interface

Defines a parent-theme migration.

Defines a parent-theme migration.

Capabilities and extension points

Defines a parent-theme migration.

IDs are permanent ledger keys. Execution must be idempotent: completed steps survive a later failure. Return WP_Error or throw to stop the runner; other execution return values, including false, are treated as success.

Gets the immutable migration identifier.

  • return string Migration identifier.

Gets the parent version that introduced the migration.

  • return string Target version.

Determines whether the migration applies to the current site.

  • param Context $context Migration context.
  • return bool Whether to execute. False records completion without execution.

Applies behavior for a clean installation.

  • param Context $context Migration context.
  • return mixed WP_Error on failure; any other result means success.

Preserves existing-site behavior during an update.

  • param Context $context Migration context.
  • return mixed WP_Error on failure; any other result means success.

Source reference

This editable reference page is based on the PHP documentation in updates/interfaces/interface-migration.php.