StartPlaygroundOptions
Index
Properties
optionalblueprint
optionalcorsProxy
optionaldisableProgressBar
optionalexperimentalBlueprintsV2Runner
Prefer experimental Blueprints v2 PHP runner instead of TypeScript steps
optionalgitAdditionalHeadersCallback
Additional headers to pass to git operations. A function that returns headers based on the URL being accessed.
Type declaration
Parameters
url: string
Returns Record<string, string>
iframe
optionalmounts
optionalonBlueprintStepCompleted
optionalonBlueprintValidated
Type declaration
Parameters
blueprint: BlueprintV1Declaration
Returns void
optionalonClientConnected
Called when the playground client is connected, but before the blueprint steps are run.
Type declaration
Parameters
playground: PlaygroundClient
Returns void
optionalpathAliases
Path aliases that map URL prefixes to filesystem paths outside
the document root. Similar to Nginx's alias directive.
optionalprogressTracker
remoteUrl
optionalscope
The string prefix used in the site URL served by the currently
running remote.html. E.g. for a prefix like /scope:playground/,
the scope would be playground. See the @php-wasm/scopes package
for more details.
optionalshouldBootWordPress
Whether to run WordPress boot setup.
This is separate from shouldInstallWordPress because saved sites can boot
from existing WordPress files without downloading or installing a fresh copy.
Set this to false for PHP-only Playgrounds.
If shouldInstallWordPress is false and this option is true, WordPress
files must already be present, for example via mounts or a saved site.
optionalshouldInstallWordPress
Whether to download/install WordPress files.
Set this to false when WordPress files are already available, for example
from mounts or a saved site.
This option cannot be set to true when shouldBootWordPress is false,
because installing WordPress requires running the WordPress boot setup.
optionalsqliteDriverVersion
The version of the SQLite driver to use. Defaults to the latest development version.
optionalwordpressInstallMode
How to handle WordPress installation. Defaults to 'install-from-existing-files-if-needed'.
Proxy URL to use for cross-origin requests.
For example, if corsProxy is set to "https://cors.wordpress.net/proxy.php", then the CORS requests to https://github.com/WordPress/wordpress-playground.git would actually be made to https://cors.wordpress.net/proxy.php?https://github.com/WordPress/wordpress-playground.git.
The Blueprints library will arbitrarily choose which requests to proxy. If you need to proxy every single request, do not use this option. Instead, you should preprocess your Blueprint to replace all cross-origin URLs with the proxy URL.