Setup¶
This guide walks through setting up the local development environment from a fresh clone. Make sure you have all prerequisites installed first.
Automated Setup (Recommended)¶
The setup script handles Composer dependencies, .env creation, and Docker container startup in one step:
git clone git@github.com:Tinnitus-App/tinnitus-wordpress.git
cd tinnitus-wordpress
./scripts/setup.sh
The script performs the following:
- Runs
composer installto download WordPress core, plugins, and dev tools - Copies
.env.exampleto.envand sets Docker-friendly defaults (DB_HOST='db',DB_NAME='wordpress', etc.) - Starts Docker containers with
docker compose up -d --build
After the script completes, the site is available at http://localhost:8080.
Generate Security Salts¶
The setup script does not generate unique security salts. Visit roots.io/salts.html, generate a set of salts, and paste them into .env, replacing the generateme placeholder values.
Warning
Do not skip salt generation. The placeholder values are publicly known and provide no security.
Manual Setup¶
If you prefer to run each step yourself:
git clone git@github.com:Tinnitus-App/tinnitus-wordpress.git
cd tinnitus-wordpress
# 1. Install Composer dependencies
composer install
# 2. Create environment file
cp .env.example .env
# 3. Edit .env with Docker-appropriate values
Open .env and set these values:
DB_NAME='wordpress'
DB_USER='wordpress'
DB_PASSWORD='wordpress'
DB_HOST='db'
WP_HOME='http://localhost:8080'
Then generate and paste in unique salts from roots.io/salts.html.
Docker Services¶
The docker-compose.yml defines two services:
| Service | Image | Port | Purpose |
|---|---|---|---|
wordpress |
Custom (Dockerfile) | 8080 |
PHP + Apache serving the Bedrock project |
db |
mariadb:10.6 |
3306 |
MariaDB database with health checks |
The database uses a named volume (db_data) so data persists across container restarts. To reset the database entirely:
Verify the Installation¶
Once containers are running, confirm:
- Site loads: Open http://localhost:8080. On first run, you will see the WordPress installation wizard.
- Database connects: The WordPress installer reaching the "site title" step confirms the database connection is working.
-
Containers are healthy:
Both services should show status
Up(thedbservice should report(healthy)).
Note
If the site does not load, check docker compose logs wordpress for errors. The most common issue is the database container still starting up --- the health check ensures WordPress waits, but the first build can take a minute.
Daily Workflow¶
After initial setup, you only need:
docker compose up -d # Start containers
docker compose down # Stop containers
docker compose logs -f # Follow logs (useful for debugging)
For the full list of available commands, see the Commands reference.
Next: First Steps covers accessing the admin panel, running quality checks, and building the theme CSS.