WordPress — Bedrock¶
All our WordPress projects are built on Bedrock, a modern WordPress boilerplate. Bedrock introduces proper dependency management via Composer, environment-based configuration, and a structured directory layout — replacing the traditional WordPress approach where plugins, themes, and core all live in the same flat directory.
Used in: Barberklingen.dk, Barberklingen.se, Barberklingen.nl, Kaffedrengen.dk
Project structure¶
Bedrock moves WordPress core into its own web/wp/ subdirectory and renames wp-content/ to web/app/, keeping application code separate from WordPress itself.
├── composer.json
├── config/
│ ├── application.php
│ └── environments/
│ ├── development.php
│ ├── staging.php
│ └── production.php
├── customizations/
│ ├── plugins/
│ └── statics/
├── vendor/
└── web/
├── app/
│ ├── mu-plugins/
│ ├── plugins/
│ ├── themes/
│ └── uploads/
├── wp-config.php
├── index.php
└── wp/
Plugins and themes¶
All plugins and themes are managed through Composer. This gives us version pinning, dependency resolution, and reproducible installs — problems that plagued the old setup where shared libraries like Guzzle were bundled separately inside each plugin, leading to version conflicts that were difficult to debug.
Official plugins¶
WPackagist mirrors the official WordPress.org plugin and theme repositories as Composer packages:
# Install the latest version of WooCommerce
composer require wpackagist-plugin/woocommerce
# Update within defined version constraints
composer update wpackagist-plugin/woocommerce
# Update to a specific version outside current constraints
composer require wpackagist-plugin/woocommerce:^2.6
Private plugins and modules¶
We maintain a private Satis registry for internal packages. These are all prefixed barberklingen/* and installed the same way:
See Satis — Private Package Registry for setup details.
Premium plugins¶
Premium plugins (e.g. from the WooCommerce Marketplace) are not available through WPackagist. We maintain them in a private repository, tagged and updated manually, and serve them through Satis under the barberklingen-premium/* prefix:
Manual updates only
The premium plugin repository only reflects our own manual updates. New upstream versions are not pulled in automatically — they must be downloaded and committed by hand.
Customizations¶
Each project has a customizations/ folder in the root that is not part of the standard Bedrock structure. It contains:
| Folder | Purpose |
|---|---|
customizations/plugins/ | A project-specific Composer package containing all business logic unique to that project |
customizations/statics/ | Custom JavaScript and CSS for the project (if present) |
The plugin in customizations/plugins/ is a proper Composer package but is local to the project — it is not published to Satis or any external registry.
Known duplication
Some code in customizations/plugins/ is duplicated across projects. The intention is to isolate reusable logic into shared packages over time.
Compiling statics¶
From the project root: