- Download and install Docker Desktop from Docker's official website.
- Ensure Docker is running.
- Download DDEV from the official site.
- Install it using the package manager for your OS:
- macOS:
brew install ddev
- Windows:
Use the provided installer or Chocolatey:choco install ddev
- Linux:
Follow the Linux installation guide.
- macOS:
- Open a terminal and run:
ddev version
- Create a directory for your Drupal or WordPress project:
mkdir ~/projects/my-drupal-site mkdir ~/projects/my-wordpress-site
- Navigate into the directory:
cd ~/projects/my-drupal-site
- Run the configuration command:
ddev config
- Follow the prompts:
- Project Name: (Optional, defaults to folder name)
- Docroot Location:
- For Drupal: Usually
/web
. - For WordPress:
/
.
- For Drupal: Usually
- Project Type:
- Select
drupal9
,drupal10
, orwordpress
.
- Select
- Confirm your configuration. DDEV will create a
.ddev
folder with configuration files.
-
If you don't have an existing codebase:
- Drupal:
ddev composer create drupal/recommended-project
- WordPress:
ddev wp core download
- Drupal:
-
If you have an existing codebase, place the code in the directory and adjust the configuration if necessary.
- Start the DDEV services:
ddev start
- Access your site:
- DDEV will provide a URL like
http://my-drupal-site.ddev.site
.
- DDEV will provide a URL like
- DDEV provides built-in database services.
- Login credentials are available by running:
ddev describe
- Install Drupal using the URL provided by DDEV.
- For custom configurations, edit
settings.php
:- Add DDEV's database credentials (provided by
ddev describe
).
- Add DDEV's database credentials (provided by
- Run the WordPress installation script:
ddev wp core install --url="http://my-wordpress-site.ddev.site" \ --title="My WordPress Site" \ --admin_user="admin" \ --admin_password="password" \ --admin_email="[email protected]"
- Stop the environment when not in use:
ddev stop
- Remove the environment:
ddev delete
ddev status