<p>That error is likely due to Craft not being installed yet (it’s Composer-installed but not… Craft-installed), because your local DDEV database is empty.</p>
<p>Either</p>
<ul>
<li>(Recommended) Dump the database from another environment (preferably production) using your method of choice (you can even download a database backup from Craft’s CP in production via the Utilities section), and import it to your local DDEV site by running <code>ddev import-db</code></li>
<li>…or, install a “fresh” version of the site locally by running <code>ddev craft install</code> (or <code>ddev exec php craft install</code> if you’re not using the “craftcms” DDEV project type). The install should have the same schema (ie sections, fields etc) as your production site, but will be completely empty in terms of content.</li>
</ul>

CC BY-SA 4.0
2023-07-11T17:03:30.740Z
I thought it would be something simple like that! Thanks so much!
George Bleasdale
CC BY-SA 4.0
2023-07-11T18:57:15.487Z
I would actually recommend the second approach. Spin up the site with no seed database, just with all structures in place. Load up the frontend and see if you get any errors. Create some demo content and see if everything works as intended without existing contents in place. We do this at work, every developer has their own dev environment with at best some starter contents created through a migration, and we only rarely pull in the live DB for debugging or testing. Great way to see if you've coded defensively enough - if you get errors, good opportunity to improve on that.
MoritzLost
CC BY-SA 4.0
2023-07-13T05:54:47.543Z
Relatively minor point but this part of your initial install: `Installed PHP` was not necessary or useful - the point of DDEV is that it contains/manages all the dependencies (PHP version, DB etc) - i.e. if you look in your `.ddev.config.yaml` you will see e.g. `php_version: "8.2"` - meaning that ddev project will use PHP8.2.  You might have some other project using, e.g. PHP 7.4 or whatever.  Generally the best thing is to keep your computer free of such things at the 'outside of ddev' level so that each project is self contained with all its versions/dependencies.
Jeremy Daalder
CC BY-SA 4.0
2023-07-11T16:57:16.783Z
2023-07-11T16:57:16.783Z
Mats Mikkel Rummelhoff
<p>I've got a craft cms 4 website that I've been developing locally on my old PC and I've also got hosted with <a href="https://servd.host/" rel="nofollow noreferrer">Servd Host</a>. I've just got a new mac and I'm trying to get my project running locally on it but running into some problems. Here's what I've done:</p>
<ul>
<li>Installed Docker</li>
<li>Installed PHP</li>
<li>Installed DDVEV</li>
<li>Cloned the repository</li>
<li>Ran composer install and composer dump-autoload</li>
<li>Ran ddev config --project-type=craftcms</li>
<li>Ran ddev start</li>
</ul>
<p>I'm getting the following error (see screenshot). Any ideas what's causing it and how to fix? I'm fairly new to Craft so don't really understand this side of things.</p>
<p><a href="https://i.sstatic.net/uoApZ.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uoApZ.jpg" alt="enter image description here" /></a></p>

<error-message><installation><craft4>
New Laptop - Developing Existing Project Locally
# New Laptop - Developing Existing Project Locally

(Asked by: username_0 on 2023-07-11)

I've got a craft cms 4 website that I've been developing locally on my old PC and I've also got hosted with [Servd Host](https://servd.host/). I've just got a new mac and I'm trying to get my project running locally on it but running into some problems. Here's what I've done:

* Installed Docker
* Installed PHP
* Installed DDVEV
* Cloned the repository
* Ran composer install and composer dump-autoload
* Ran ddev config --project-type=craftcms
* Ran ddev start

I'm getting the following error (see screenshot). Any ideas what's causing it and how to fix? I'm fairly new to Craft so don't really understand this side of things.

[![enter image description here](https://i.sstatic.net/uoApZ.jpg)](https://i.sstatic.net/uoApZ.jpg)

**Tags:** error-message, installation, craft4

---

## 1 answers

### Answer by username_1 on 2023-07-11. Score: 2 | Accepted answer

That error is likely due to Craft not being installed yet (it’s Composer-installed but not… Craft-installed), because your local DDEV database is empty.

Either

* (Recommended) Dump the database from another environment (preferably production) using your method of choice (you can even download a database backup from Craft’s CP in production via the Utilities section), and import it to your local DDEV site by running `ddev import-db`
* …or, install a “fresh” version of the site locally by running `ddev craft install` (or `ddev exec php craft install` if you’re not using the “craftcms” DDEV project type). The install should have the same schema (ie sections, fields etc) as your production site, but will be completely empty in terms of content.

> **Comments:**
> **username_0**: I thought it would be something simple like that! Thanks so much!  
> **username_2**: I would actually recommend the second approach. Spin up the site with no seed database, just with all structures in place. Load up the frontend and see if you get any errors. Create some demo content and see if everything works as intended without existing contents in place. We do this at work, every developer has their own dev environment with at best some starter contents created through a migration, and we only rarely pull in the live DB for debugging or testing. Great way to see if you've coded defensively enough - if you get errors, good opportunity to improve on that.  
> **username_3**: Relatively minor point but this part of your initial install: `Installed PHP` was not necessary or useful - the point of DDEV is that it contains/manages all the dependencies (PHP version, DB etc) - i.e. if you look in your `.ddev.config.yaml` you will see e.g. `php_version: "8.2"` - meaning that ddev project will use PHP8.2.  You might have some other project using, e.g. PHP 7.4 or whatever.  Generally the best thing is to keep your computer free of such things at the 'outside of ddev' level so that each project is self contained with all its versions/dependencies.  

---

