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

0.4.1 2026-02-10 09:35 UTC

This package is auto-updated.

Last update: 2026-02-14 09:30:42 UTC


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:

  1. Creates the web/ directory structure (document root)
  2. Generates web/wp-config.php (loads config from config/ directory)
  3. Generates web/index.php (WordPress front controller)
  4. Symlinks theme/web/wp-content/themes/{name}
  5. Symlinks mu-plugins/web/wp-content/mu-plugins/_custom
  6. 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