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.
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 |