Project Architecture¶
Overview¶
This is a Roots Bedrock WordPress project. Bedrock restructures the standard WordPress layout to separate WordPress core from application code, manage dependencies via Composer, and handle environment config with dotenv.
Directory structure¶
.
├── .github/workflows/ # GitHub Actions CI/CD
├── devops/ # Docker build files per environment
│ ├── dev/ # Plain HTTP (no SSL)
│ ├── local/ # Self-signed SSL for local dev
│ └── prod/ # Production container config
├── docs/ # Project documentation
├── site/ # WordPress application root (Bedrock)
│ ├── config/
│ │ ├── application.php # Main WP config (env-driven)
│ │ └── environments/ # Per-environment overrides
│ ├── customizations/plugin/ # In-repo custom plugin
│ ├── vendor-plugins/ # Vendored plugins not on Packagist
│ ├── web/
│ │ ├── app/ # WP content dir (plugins, themes, uploads)
│ │ ├── wp/ # WordPress core (git-ignored, Composer-managed)
│ │ └── index.php
│ ├── composer.json # All PHP dependencies
│ └── wp-cli.yml
├── system/
│ ├── cronjobs/ # Server cron scripts
│ ├── releases/ # Deployment release directories
│ ├── shared-cronjobs/ # Submodule: shared cron scripts
│ └── wp-uploads/ # Persistent uploads (mounted into container)
├── .env.example # Root env template (Docker + WP config)
├── docker-compose.yml # Base Docker services
└── docker-compose.override.yml # Local overrides (git-ignored)
Stack¶
| Component | Technology |
|---|---|
| Language | PHP 7.4 |
| WordPress | 6.3 (via Composer) |
| E-commerce | WooCommerce 9.x |
| Web server | Nginx |
| PHP runtime | PHP-FPM |
| Database | MariaDB |
| Cache | Redis |
| Node | 14.x (for asset builds) |
| Asset pipeline | Laravel Mix (webpack) |
Dependency management¶
All PHP dependencies — WordPress core, plugins, and custom packages — are declared in site/composer.json and installed via Composer.
Repositories used:
| Registry | Purpose |
|---|---|
wpackagist.org | Free WP plugins/themes mirrored from wp.org |
packagist.barberklingen.dk | Private registry for Barberklingen premium packages |
composer.elementor.com | Elementor Pro |
./customizations/plugin | In-repo custom plugin (path repository) |
./vendor-plugins/* | Vendored plugins shipped with the repo |
Plugins and themes install into web/app/plugins/ and web/app/themes/ respectively. WordPress core installs into web/wp/. All of these paths are git-ignored.
Environment configuration¶
Configuration is environment-driven via dotenv. The load order in config/application.php:
.env— loaded first (containsDOTENV_KEYfor vault decryption in production)- dotenv-vault — decrypts
.env.vaultusingDOTENV_KEY .env.override— optional local overrides (mounted by Docker Compose)
WP_ENV defaults to production and controls which file in config/environments/ is loaded.
Cron jobs¶
WordPress cron is disabled (DISABLE_WP_CRON=true in production). Jobs run as real system crons from system/cronjobs/ and system/shared-cronjobs/. Each script bootstraps via system/cronjobs/_bootstrap.sh which sets the correct WP path.