How to import a DB to a local Craft CMS running on DDEV
![Oscar de la Hera Gomez](https://www.delasign.com/CDN/headshots/profile.webp)
![Two flower that represent Craft CMS and DDEV. Beneath them sits the text "Import Local DB."](https://www.delasign.com/CDN/images/How-to-import-a-DB-to-a-local-Craft-CMS-running-on-DDEV.webp)
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.](https://www.delasign.com/CDN/images/Start-DDEV.webp)
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.](https://www.delasign.com/CDN/images/Backup.webp)
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.](https://www.delasign.com/CDN/images/Get-Path.webp)
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.](https://www.delasign.com/CDN/images/Import_2024-01-03-125732_lnro.webp)
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 inquiries@delasign.com with any thoughts or feedback you may have.