Skip to content
Bedrock

Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.

Bedrock Local Development with DDEV

View as Markdown:

DDEV is a local PHP development environment. In this guide you will learn how to setup a Bedrock-based WordPress site with DDEV.

Setting up a Bedrock site

$ ddev config --project-type=wordpress --docroot=web --create-docroot
$ ddev composer create roots/bedrock

Configure environment variables

Bedrock requires environment variables to be configured in order to get started.

The .env file must be configured with DDEV's database settings along with your home URL. Update the following values in your .env file:

DB_NAME='db'
DB_USER='db'
DB_PASSWORD='db'
DB_HOST='db'

WP_HOME="${DDEV_PRIMARY_URL}"
WP_SITEURL="${DDEV_PRIMARY_URL}/wp"

After configuring the environment variables, run ddev start. Your site will be accessible at https://ddevtest.ddev.site/.

Last updated