โฑ๏ธ Start Coding in 5 Minutes
1. Requirements
- Docker Engine v24+ (includes Compose v2)
- GNU Make – required to run project commands
- Git – for version control and cloning the repository
๐ฅ๏ธ Supported Platforms: macOS, Linux, and Windows (with WSL2). See Platform Notes for details.
2. Getting Started
โก๏ธ Looking to scaffold a new WordPress project, not just clone this StarterKit? See: Advanced Installation Options. You’ll generate your own repository with independent Git history and configuration โ a clean foundation ready to customize and deploy.
Clone the repository:
git clone https://github.com/solidbunch/starter-kit-foundation.git my-project
Customize environment variables by editing the .env
files in the config/environment/
folder:
.env.main
โ shared base config, editAPP_NAME
andAPP_TITLE
.env.type.local
,.env.type.dev
,.env.type.stage
,.env.type.prod
โ environment-specific overrides, editAPP_DOMAIN
variable.- You can create as many
.env.type.*
files as needed (.env.type.qa
,.env.type.stage2
, etc.)
๐ Tip: We recommend using the
/srv
folder instead of/var/www
for your web content.
This follows the Filesystem Hierarchy Standard (FHS), which suggests/srv
for site-specific data served by the system.
3. Install the Stack
make install [environment_type]
environment_type
if omitted, defaults to local
, it must match a file in config/environment/.env.type.*
What happens during installation
- If
.env.secret
is missing, it is generated from a template .env.main
,.env.type.[environment_type]
, and.env.secret
are merged into root folder.env
file- Docker containers are pulled and started
- Composer dependencies are installed (PHP)
- npm dependencies are installed (Node)
- Frontend assets are compiled via
npm run dev|prod
- The database is initialized using WP-CLI
- WordPress is installed and configured
- An admin user is created and the default theme is activated
โป๏ธ Note You can safely re-run
make install
at any time – it is idempotent.
Examples
โ Install locally (most common scenario):
make install
This will use config/environment/.env.type.local
.
Install using the production environment:
make install prod
This will use config/environment/.env.type.prod
, applying values like APP_DOMAIN
, APP_PROTOCOL
, etc.
4. Post-Installation
โ Once the installation is complete, your WordPress site is running inside Docker containers and ready to use.
The site domain is defined in the APP_DOMAIN
variable inside your active .env.type.local
file.
To make it work locally, you must add it to your /etc/hosts
file:
127.0.0.1 myproject.local
๐ก Tip: Domains ending with
.localhost
do not require manual host mapping.
To open the site in your browser:
http://myproject.local
Or access the admin panel directly:
http://myproject.local/wp-admin
Login credentials are printed in the terminal during make install
, and also stored in config/environment/.env.secret
:
WP_ADMIN_USER=admin
WP_ADMIN_PASSWORD=...
Now you can start developing your theme and plugins, or customize the WordPress installation as needed.
๐ Security Note: The
.env.secret
file contains sensitive credentials and should not be committed to version control. It is generated automatically during installation and should be kept secure.๐ ๏ธ Tip: If you have any problems during installation, check the The Troubleshooting section for common issues and solutions.