Create a free account to get access to additional free training videos. Enjoy this free video from CraftQuest! Create a free account to get access to additional free training videos. Join the Community
Ryan shows how quickly you can get a new project set up locally with a DDEV-based starter project stored as a Github template repository. All of his new Craft training articles and video tutorials will use this method for starting a project.
Here’s a quick way to get a local development environment set up for Craft 5. There’s a little bit of command line work but it isn’t really bad, and I know you can do it. And, the best part is that you’ll have a solid local hosting environment that won’t let you down.
For localhosting, we’ll use DDEV, which is the recommended way to run Craft CMS projects locally. I have several videos and a course on DDEV right here on CraftQuest.
Before we get started, let’s make sure we a Docker engine running. You can use Docker Desktop, which is available for macOS or Windows, or you can use Orbstack, which is free for personal use. Orbstack is my preferred tool, and I recommend it for you, too.
You can google for Orbstack or Docker Desktop and follow the download and installation instructions for your operating system. You don’t need any special configuration or code to make this work.
Next, we’ll go to my starter project on Github. The starter project uses DDEV and Composer to make it very simple to get started locally with a clean, vanilla Craft CMS project.
Go to https://github.com/CraftQuest/craft-5-start and we’ll clone the repository locally into a new directory:
mkdir craft5 && cd craft5
And then clone the repository:
git clone [email protected]:CraftQuest/craft-5-start.git .
And, finally, we’ll use DDEV to start up the project:
ddev start
When the project starts up, it will install all dependencies and populate a starter database. After that, you can navigate to the project in your web browser: