Skip to content

WP Packages is our new WPackagist replacement that's 17x faster and updates every 5 minutes

Bedrock

Roots and WP Packages are independent open source projects, supported only by developers like you. We’ve been improving the WordPress developer experience since 2011, and your support keeps it independent.

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