Fix 403 on Bedrock DDEV
August 30, 2025 · AI Conversations
https://myapicalls.com/
1) You’re hitting the wrong hostname (router doesn’t have a site for it)
2) Docroot isn’t set to Bedrock’s `/web`
3) Bedrock not installed/configured yet (no `web/index.php`)
Do this quick set:
### 1) Confirm the URL DDEV expects
Run:
ddev describe
Use the URL it shows (e.g. `https://.ddev.site`).
If you specifically want `https://myapicalls.com`, either:
– rename the project to `mac`, or
– add an alias.
Add alias in `.ddev/config.yaml`:
name: yourprojectname
docroot: web
additional_hostnames:
- mac
Then:
ddev restart
Now `https://myapicalls.com` will route to your project.
### 2) Ensure docroot is `/web`
Bedrock’s public files live in `/web`. If your docroot isn’t set, you’ll get a 403 (no index). Set it:
ddev config --project-type=wordpress --docroot=web --create-docroot=false
ddev restart
### 3) Finish Bedrock install (inside the container)
ddev composer install
Create `.env` (copy `.env.example`) and set:
DB_NAME='db'
DB_USER='db'
DB_PASSWORD='db'
DB_HOST='db'
WP_ENV='development'
WP_HOME='https://myapicalls.com' # or the URL from `ddev describe`
WP_SITEURL='${WP_HOME}/wp'
(Generate salts as you like; e.g. with WP-CLI dotenv or paste them in.)
### 4) Sanity checks
– `ddev logs -s web` (look for permission/index errors)
– Confirm `web/index.php` exists after `composer install`
– If you changed the project name, `ddev stop && ddev start`
If you still see 403, paste the output of `ddev describe` and the relevant parts of `.ddev/config.yaml` and I’ll pinpoint it.