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.
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
composer require studiometa/foehn-installerConfigure 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 |
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/
MIT