How to import a DB to a local Craft CMS running on DDEV

Start the DDEV Instance and in Terminal run ddev import-db --file=DB_PATH.

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 01/03/2024 at 04:40
Last Updated on 01/03/2024 at 08:11
<p>Two flower that represent Craft CMS and DDEV. Beneath them sits the text "Import Local DB."</p>

Start the DDEV Instance and in Terminal run ddev import-db --file=DB_PATH.

SubscribeCraft CMS & DDEV: A Quick Start Guide

Step One: Start DDEV

A screenshot of Terminal showing you how to start Craft CMS using DDEV.

In Terminal, set the current directory to that of your project, and run the line below to start ddev.

ddev start
Craft CMS & DDEV: A Quick Start Guide

Step Two: Download the Backup

<p>A screenshot of Craft CMS showing how to backup a DB hosted on a server.</p>

On a hosted Craft CMS, select Utilities > Database Backup > Backup.

Step Three: Gather the DB Path

<p>A screenshot showing how if you drag a file from Finder into a terminal, the terminal will give you the files absolute path.</p>

Drag the downloaded DB into the terminal to gather its path.

Step Four: Import the DB

<p>A screenshot of Terminal showing you that if you run the line found below the DB will be successfully imported into the DDEV Craft CMS instance.</p>

In Terminal, run the line below.

Make sure to replace DB_PATH with the path gathered in Step Three.

ddev import-db --file=DB_PATH

Looking to learn more about Craft CMS ?

Search our blog to find educational content on Craft CMS.

Search our Blog

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
SubscribeContact UsVisit our BlogView our ServicesView our Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe