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

Oscar de la Hera Gomez
Two flower that represent Craft CMS and DDEV. Beneath them sits the text "Import Local DB."

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

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

Step Two: Download the Backup

A screenshot of Craft CMS showing how to backup a DB hosted on a server.

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

Step Three: Gather the DB Path

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

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

Step Four: Import the DB

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.

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.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details