Write Site File
write_site_fileWrite files directly to a Local by Flywheel site's directory. Supports any site path except WordPress core folders, with writes enabled via FS_ALLOW_WRITES.
Instructions
Write content to a file in the Local by Flywheel site directory. Requires FS_ALLOW_WRITES=true. Cannot write to wp-admin/ or wp-includes/ (WordPress core). Path is relative to the site root.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"content": "<content>"
},
"name": "write_site_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative path from site root (e.g., "app/public/wp-content/themes/mytheme/functions.php") | |
| site | No | Site name, ID, or domain. Uses env var if not specified. | |
| content | Yes | File content to write |