Project Architecture and Structure

StarterKit Foundation is composed of two core layers: the environment (containers, configuration files, and scripts) and the WordPress application (core, content, and theme). The architecture is structured for modularity, scalability, and predictability across local, staging, and production workflows.

β”œβ”€β”€ backups/                  # Daily and weekly WordPress media, and database backups
β”œβ”€β”€ config/                   # Global config files
β”‚   β”œβ”€β”€ certbot/              # Let's Encrypt configuration for SSL certificates
β”‚   β”œβ”€β”€ cron/                 # Cron jobs for scheduled tasks
β”‚   β”œβ”€β”€ environment/          # Environment configuration files
β”‚   β”œβ”€β”€ nginx/                # Nginx configuration templates
β”‚   β”œβ”€β”€ php/                  # PHP .ini configuration per environment
β”‚   └── ssl/                  # SSL certificates and keys
β”œβ”€β”€ db-data/                  # Persistent database volume
β”œβ”€β”€ dockerfiles/              # Custom Dockerfile definitions
β”œβ”€β”€ iac/                      # Infrastructure as Code (Terraform + Ansible)
β”œβ”€β”€ logs/                     # Log files for WordPress, PHP, nginx
β”œβ”€β”€ sh/                       # Shell scripts: setup, CLI wrappers, backups
β”œβ”€β”€ web/                      # Web application folder
β”‚   β”œβ”€β”€ wp-config/            # WordPress config (wp-config.php) & files that should be copied to web root
β”‚   β”œβ”€β”€ wp-content/           # Themes, plugins, uploads
β”‚   β”‚   β”œβ”€β”€ mu-plugins/       # Must-use plugins (auto-loaded)
β”‚   β”‚   β”œβ”€β”€ plugins/          # Composer or manually installed plugins
β”‚   β”‚   β”œβ”€β”€ themes/           # Themes folder. Add your theme here
β”‚   β”‚   └── uploads/          # User-uploaded media (excluded from VCS)
β”‚   └── wp-core/              # WordPress core (managed by Composer)
β”œβ”€β”€ .editorconfig             # Editor configuration for consistent coding style
β”œβ”€β”€ composer.json             # PHP and WordPress dependencies
β”œβ”€β”€ docker-compose.yml        # Main Docker Compose file
β”œβ”€β”€ docker-compose.build.yml  # Additional services (Node.js, MailHog, etc.)
└── Makefile                  # Developer-friendly command aliases

Docker Services

The project defines multiple containers to cover all development and runtime needs:

Main Docker Compose file (docker-compose.yml):

  • mariadb – MariaDB database service
  • php – PHP-FPM container with WP-CLI and Xdebug
  • nginx – Web server container using templated configs
  • cron – Cron service for scheduled tasks

Additional services (docker-compose.build.yml):

  • composer – Composer service for managing PHP/WordPress dependencies
  • node – Node.js container for building front-end assets
  • phpmyadmin – Optional phpMyAdmin interface for local DB access
  • certbot – Let’s Encrypt container for SSL certificate management
  • mailhog – Optional SMTP server for testing outgoing email

These services ensure developers and DevOps engineers have all the tools needed to work efficiently across environments.

WordPress Application

WordPress is installed using Composer, with the following layout:

  • wp-core/ contains the WordPress core files
  • wp-config/ includes the project’s configuration files
  • wp-content/ houses themes, plugins, and uploads

This separation allows for:

  • isolated configuration management
  • centralized dependency control
  • absolute consistent behavior from local to production setups
  • secure handling of sensitive data
  • easy updates and maintenance

WordPress File Structure Compatibility

Some modern WordPress boilerplates restructure core directories to enforce stricter separation of concerns. While this can improve modularity, it often introduces friction β€” many themes and plugins expect the native WordPress layout and fail when paths like wp-content/ or wp-config.php are moved.

StarterKit avoids this by preserving the default WordPress file structure. There’s no need to rewrite plugin paths, patch templates, or maintain custom autoloaders.

Instead, project-level configuration, secrets, and Composer dependencies are isolated outside the web root, delivering the benefits of modern infrastructure β€” without sacrificing compatibility.

This approach provides:

  • βœ… Full support for plugins and themes expecting standard WordPress paths
  • βœ… Secure handling of environment-specific files
  • βœ… Dependency management with Composer
  • βœ… Consistent behavior across local and production environments β€” no surprises

Clean architecture, minimal assumptions, zero breakage.