Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[CLI] Add --wordpress-install-mode flag #2803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
adamziel wants to merge 8 commits into trunk
base: trunk
Choose a base branch
Loading
from wordpress-install-mode-flag
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project are documented in this file by a CI job
that runs on every NPM release. The file follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
format.

## [v3.0.14] (2025年10月21日)

### Various

- [i18n] Add Japanese translations to JavaScript API. ([#2800](https://github.com/WordPress/wordpress-playground/pull/2800))

### Contributors

The following contributors merged PRs in this release:

@shimotmk


## [v3.0.13] (2025年10月20日)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "3.0.13",
"version": "3.0.14",
"useWorkspaces": true,
"useNx": true
}
42 changes: 21 additions & 21 deletions package-lock.json
View file Open in desktop

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The `server` command supports the following optional arguments:
- `--blueprint=<path>`: The path to a JSON Blueprint file to execute.
- `--blueprint-may-read-adjacent-files`: Consent flag: Allow "bundled" resources in a local blueprint to read files in the same directory as the blueprint file.
- `--login`: Automatically log the user in as an administrator.
- `--skip-wordpress-setup`: Do not download or install WordPress. Useful if you are mounting a full WordPress directory.
- `--wordpress-install-mode <mode>`: Control how Playground prepares WordPress before booting. Defaults to `download-and-install`. Other options: `install-from-existing-files` (install using files you've mounted), `install-from-existing-files-if-needed` (skip setup when an existing site is detected), and `do-not-attempt-installing` (never download or install WordPress).
Copy link
Member

@brandonpayton brandonpayton Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are lovely, clear option names!

- `--skip-sqlite-setup`: Do not set up the SQLite database integration.
- `--verbosity`: Output logs and progress messages. Choices are "quiet", "normal" or "debug". Defaults to "normal".
- `--debug`: Print the PHP error log if an error occurs during boot.
Expand Down
13 changes: 13 additions & 0 deletions packages/docs/site/docs/main/changelog.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ All notable changes to this project are documented in this file by a CI job
that runs on every NPM release. The file follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
format.

## [v3.0.14] (2025年10月21日)

### Various

- [i18n] Add Japanese translations to JavaScript API. ([#2800](https://github.com/WordPress/wordpress-playground/pull/2800))

### Contributors

The following contributors merged PRs in this release:

@shimotmk


## [v3.0.13] (2025年10月20日)

### Enhancements
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ The `server` command supports the following optional arguments:
- `--blueprint=<path>`: 実行する JSON ブループリント ファイルへのパス。
- `--blueprint-may-read-adjacent-files`: 同意フラグ: ローカル ブループリント内の「バンドル」リソースが、ブループリント ファイルと同じディレクトリにあるファイルを読み取ることを許可します。
- `--login`: ユーザーを管理者として自動的にログインします。
- `--skip-wordpress-setup`: WordPress をダウンロードまたはインストールしません。WordPress ディレクトリ全体をマウントする場合に便利です
- `--wordpress-install-mode <mode>`: WordPress の準備方法を制御します。既定値は `download-and-install` です。他のオプション: `install-from-existing-files` (マウント済みのファイルを使ってインストール)、`install-from-existing-files-if-needed` (既存サイトを検出した場合はセットアップを省略) 、`do-not-attempt-installing` (WordPress をダウンロードもインストールもしません)
- `--skip-sqlite-setup`: SQLite データベース統合をセットアップしません。
- `--verbosity`: ログと進捗メッセージを出力します。選択肢は「quiet」、「normal」、「debug」です。デフォルトは「normal」です。
- `--debug`: 起動中にエラーが発生した場合、PHP のエラーログを出力します。
Expand All @@ -229,7 +229,7 @@ The `server` command supports the following optional arguments:
- `--blueprint=<path>`: The path to a JSON Blueprint file to execute.
- `--blueprint-may-read-adjacent-files`: Consent flag: Allow "bundled" resources in a local blueprint to read files in the same directory as the blueprint file.
- `--login`: Automatically log the user in as an administrator.
- `--skip-wordpress-setup`: Do not download or install WordPress. Useful if you are mounting a full WordPress directory.
- `--wordpress-install-mode <mode>`: Control how Playground prepares WordPress before booting. Defaults to `download-and-install`. Other options: `install-from-existing-files` (install using files you've mounted), `install-from-existing-files-if-needed` (skip setup when an existing site is detected), and `do-not-attempt-installing` (never download or install WordPress).
- `--skip-sqlite-setup`: Do not set up the SQLite database integration.
- `--verbosity`: Output logs and progress messages. Choices are "quiet", "normal" or "debug". Defaults to "normal".
- `--debug`: Print the PHP error log if an error occurs during boot.
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
slug: /developers/apis/javascript-api
---

# JavaScript API

WordPress Playground には、WordPress を完全に制御できる JavaScript API クライアントが付属しています。

<!--
WordPress Playground comes with a JavaScript API client that grants you full control over your WordPress.
-->

:::info ここでの API は「REST API」を意味するものではありません

WordPress Playground はブラウザベースのアプリケーションです。
ここでの API とは、JavaScript 内で呼び出せる関数のセットを指します。
これはネットワークベースの REST API ではありません。

:::

<!--
:::info API here doesn't mean "REST API"

WordPress Playground is a browser-based application.
The term API here refers to a set of functions you can
call inside JavaScript. This is **not** a network-based REST API.

:::
-->

## クイックスタート

<!--
## Quick start
-->

JavaScript API を使用するには、次のものが必要です。

<!--
To use the JavaScript API, you'll need:
-->

- `<iframe>` 要素
- `@wp-playground/client` パッケージ(npm または CDN から)

<!--
- An `<iframe>` element
- The `@wp-playground/client` package (from npm or a CDN)
-->

HTML ページで JavaScript API を使用する最も短い例を次に示します。

<!--
Here's the shortest example of how to use the JavaScript API in a HTML page:
-->

import JSApiShortExample from '@site/docs/\_fragments/\_js_api_short_example.mdx';

<JSApiShortExample />

:::info /remote.html は特別な URL です

`/remote.html` は、ブラウザ UI を備えたデモアプリではなく、Playground API エンドポイントを読み込む特別な URL です。`/` と `/remote.html` の違いについては、[このページ](/developers/apis/javascript-api/-html-vs-remote-html) をご覧ください。

:::

<!--
:::info /remote.html is a special URL

`/remote.html` is a special URL that loads the Playground
API endpoint instead of the demo app with the browser UI. Read more about the difference between `/` and `/remote.html` and [on this page](/developers/apis/javascript-api/-html-vs-remote-html).

:::
-->

## ウェブサイトの制御

<!--
## Controlling the website
-->

`client` オブジェクトが作成されたので、これを使って iframe 内のウェブサイトを制御できます。制御方法は 3 つあります。

<!--
Now that you have a `client` object, you can use it to control the website inside the iframe. There are three ways to do that:
-->

- [Playground API Client](/developers/apis/javascript-api/playground-api-client)
- [ブループリント JSON](/developers/apis/javascript-api/blueprint-json-in-api-client)
- [ブループリント 関数](/developers/apis/javascript-api/blueprint-functions-in-api-client)

<!--
- [Playground API Client](/developers/apis/javascript-api/playground-api-client)
- [Blueprint JSON](/developers/apis/javascript-api/blueprint-json-in-api-client)
- [Blueprint functions](/developers/apis/javascript-api/blueprint-functions-in-api-client)
-->

## デバッグとテスト

<!--
## Debugging and testing
-->

迅速なテストとデバッグのために、JavaScript API クライアントは `index.html` と `remote.html` の両方で `window.playground` として公開されます。

<!--
For quick testing and debugging, the JavaScript API client is exposed as `window.playground` by both `index.html` and `remote.html`.
-->

```javascript
> await playground.listFiles("/")
(6) ['tmp', 'home', 'dev', 'proc', 'internal', 'wordpress']
```

`index.html` では、`playground` は Proxy オブジェクトなので、ブラウザによる自動補完は利用できません。ただし、`remote.html` では、`playground` はクラスインスタンスなので、ブラウザの自動補完を利用できます。

<!--
Note that in `index.html`, `playground` is a Proxy object and you won't get any autocompletion from the browser. In `remote.html`,
however, `playground` is a class instance and you will benefit from browser's autocompletion.
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"label": "JavaScript API"
}
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ O comando `server` suporta os seguintes argumentos opcionais:
<!-- - `--blueprint=<path>`: The path to a JSON Blueprint file to execute. -->
<!-- - `--blueprint-may-read-adjacent-files`: Consent flag: Allow "bundled" resources in a local blueprint to read files in the same directory as the blueprint file. -->
<!-- - `--login`: Automatically log the user in as an administrator. -->
<!-- - `--skip-wordpress-setup`: Do not download or install WordPress. Useful if you are mounting a full WordPress directory. -->
<!-- - `--wordpress-install-mode <mode>`: Control how Playground prepares WordPress before booting. Defaults to `download-and-install`. -->
<!-- - `--skip-sqlite-setup`: Do not set up the SQLite database integration. -->
<!-- - `--verbosity`: Output logs and progress messages. Choices are "quiet", "normal" or "debug". Defaults to "normal". -->
<!-- - `--debug`: Print the PHP error log if an error occurs during boot. -->
Expand All @@ -186,7 +186,7 @@ O comando `server` suporta os seguintes argumentos opcionais:
- `--blueprint=<path>`: O caminho para um arquivo JSON Blueprint para executar.
- `--blueprint-may-read-adjacent-files`: Flag de consentimento: Permitir que recursos "empacotados" em um blueprint local leiam arquivos no mesmo diretório do arquivo blueprint.
- `--login`: Fazer login automaticamente do usuário como administrador.
- `--skip-wordpress-setup`: Não baixar ou instalar WordPress. Útil se você está montando um diretório WordPress completo.
- `--wordpress-install-mode <mode>`: Controla como o Playground prepara o WordPress antes de inicializar. O padrão é `download-and-install`. Outras opções: `install-from-existing-files` (instala usando os arquivos montados), `install-from-existing-files-if-needed` (ignora a configuração quando detecta um site existente) e `do-not-attempt-installing` (nunca baixa ou instala o WordPress).
- `--skip-sqlite-setup`: Não configurar a integração do banco de dados SQLite.
- `--verbosity`: Saída de logs e mensagens de progresso. Opções são "quiet", "normal" ou "debug". Padrão é "normal".
- `--debug`: Imprimir o log de erro do PHP se um erro ocorrer durante a inicialização.
Expand Down
Loading
Loading

AltStyle によって変換されたページ (->オリジナル) /