Skip to main content



Type Aliases


CompiledStep: (php: UniversalPHP) => Promise<void> | void

Type declaration

    • (php: UniversalPHP): Promise<void> | void
    • Parameters

      • php: UniversalPHP

      Returns Promise<void> | void


CorePluginReference: { resource:; slug: string }

Type declaration

  • resource:

    Identifies the file resource as a WordPress Core plugin

  • slug: string

    The slug of the WordPress Core plugin


CoreThemeReference: { resource:; slug: string }

Type declaration

  • resource:

    Identifies the file resource as a WordPress Core theme

  • slug: string

    The slug of the WordPress Core theme



GenericStep<Resource>: ActivatePluginStep | ActivateThemeStep | CpStep | DefineWpConfigConstsStep | DefineSiteUrlStep | EnableMultisiteStep | ImportWxrStep<Resource> | ImportWordPressFilesStep<Resource> | InstallPluginStep<Resource> | InstallThemeStep<Resource> | LoginStep | MkdirStep | MvStep | ResetDataStep | RequestStep | RmStep | RmdirStep | RunPHPStep | RunPHPWithOptionsStep | RunWpInstallationWizardStep | RunSqlStep<Resource> | SetSiteOptionsStep | UnzipStep<Resource> | UpdateUserMetaStep | WriteFileStep<Resource> | WPCLIStep

If you add a step here, make sure to also add it to the exports below.

Type parameters

  • Resource


LiteralReference: { contents: string | Uint8Array; name: string; resource: literal }

Type declaration

  • contents: string | Uint8Array

    The contents of the file

  • name: string

    The name of the file

  • resource: literal

    Identifies the file resource as a literal file


LoginStep: { password?: string; step: login; username?: string }

Logs in to Playground. Under the hood, this function submits the wp-login.php form just like a user would.

"step": "login",
"username": "admin",
"password": "password"

Type declaration

  • optionalpassword?: string

    The password to log in with. Defaults to ‘password’.

  • step: login
  • optionalusername?: string

    The user to log in as. Defaults to ‘admin’.


OnStepCompleted: (output: any, step: StepDefinition) => any

Type declaration


SetSiteOptionsStep: { options: Record<string, unknown>; step: setSiteOptions }

Sets site options. This is equivalent to calling update_option for each option in the options object.

"step": "setSiteOptions",
"options": {
"blogname": "My Blog",
"blogdescription": "A great blog"

Type declaration

  • options: Record<string, unknown>

    The options to set on the site.

  • step: setSiteOptions

    The name of the step. Must be “setSiteOptions”.



StepDefinition: Step & { progress?: { caption?: string; weight?: number } }


StepHandler<S, Return>: (php: UniversalPHP, args: Omit<S, step>, progressArgs?: StepProgress) => Return

Type parameters

Type declaration

    • (php: UniversalPHP, args: Omit<S, step>, progressArgs?: StepProgress): Return
    • Parameters

      • php: UniversalPHP
      • args: Omit<S, step>
      • optionalprogressArgs: StepProgress

      Returns Return


StepProgress: { initialCaption?: string; tracker: ProgressTracker }

Progress reporting details.

Type declaration

  • optionalinitialCaption?: string
  • tracker: ProgressTracker


UrlReference: { caption?: string; resource: url; url: string }

Type declaration

  • optionalcaption?: string

    Optional caption for displaying a progress message

  • resource: url

    Identifies the file resource as a URL

  • url: string

    The URL of the file


VFSReference: { path: string; resource: vfs }

Type declaration

  • path: string

    The path to the file in the VFS

  • resource: vfs

    Identifies the file resource as Virtual File System (VFS)



ResourceTypes: readonly [vfs, literal,,, url] = ...


wpContentFilesExcludedFromExport: string[] = ...

Used by the export step to exclude the Playground-specific files from the zip file. Keep it in sync with the list of files created by WordPressPatcher.