studiometa / foehn-installer
Composer plugin that generates the WordPress web root, symlinks, and wp-config.php for Foehn projects.
Installs: 4
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:composer-plugin
pkg:composer/studiometa/foehn-installer
Requires
- php: ^8.4
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
README
Composer plugin that generates the WordPress web root for Føhn projects.
Note This package is part of the Føhn Framework monorepo. Please report issues and submit pull requests in the main repository.
What it does
On composer install and composer update, this plugin automatically:
- Creates the
web/directory structure (document root) - Generates
web/wp-config.php(loads config fromconfig/directory) - Generates
web/index.php(WordPress front controller) - Symlinks
theme/→web/wp-content/themes/{name} - Symlinks
mu-plugins/→web/wp-content/mu-plugins/_custom - Generates the mu-plugin loader
Installation
composer require studiometa/foehn-installer
Configuration
Configure via extra.foehn in your project's composer.json:
{
"extra": {
"foehn": {
"web-dir": "web",
"wp-dir": "wp",
"theme-dir": "theme",
"theme-name": "my-theme",
"mu-plugins-dir": "mu-plugins",
"config-dir": "config"
}
}
}
All options are optional and have sensible defaults.
| Option | Default | Description |
|---|---|---|
web-dir |
web |
Web root directory (document root) |
wp-dir |
wp |
WordPress core directory within web root |
theme-dir |
theme |
Theme source directory to symlink |
theme-name |
theme |
Theme directory name in wp-content/themes/ |
mu-plugins-dir |
mu-plugins |
Custom mu-plugins directory to symlink |
config-dir |
config |
Configuration files directory |
Generated structure
web/ ← Document root (nginx/apache)
├── index.php ← Generated front controller
├── wp-config.php ← Generated configuration
├── wp/ ← WordPress core (via composer)
└── wp-content/
├── themes/
│ └── my-theme → ../../theme/
├── plugins/ ← Composer-managed plugins
├── mu-plugins/
│ ├── 00-loader.php ← Generated loader
│ └── _custom → ../../mu-plugins/
└── uploads/
License
MIT