How to create & setup a Craft CMS project

Oscar de la Hera Gomez
A flower that represents Craft CMS. Beneath it sits the text "Starter Project."

A step by step tutorial for creating a Craft CMS project. Github repository included.

The following guide walks you through how we created our Open Source Craft CMS project that is available through the GitHub repository link listed below. If you are cloning the repository, if you have not already, we recommend that you install Homebrew, DDEV and Docker before moving on to Step Seven to complete the installation.

Additionally, if you would like to get an existing Craft CMS up and running with DDEV we recommend following our guide linked below.

Minimum Requirements

  • PHP 8.0.2+
  • MySQL 5.7.8+ with InnoDB, MariaDB 10.2.7+, or PostgreSQL 10+
  • 256MB+ memory allocated to PHP
  • 200MB+ free disk space
  • Composer 2.0+
  • Docker

Tutorial

Step One: Install Homebrew

A screenshot of the Homebrew website.

We will use Homebrew to install DDEV. Make sure that the Homebrew package manager is installed on your system, using the link below.

Step Two: Install & Open Docker

A screenshot of Terminal showing you how to run the line written below to install docker.

DDEV works with Docker, which must be both installed and open for the DDEV installation to work.

Install Docker Desktop

brew cask install docker

Open Docker App

open /Applications/Docker.app/

Step Three: Install DDEV

A screenshot of Terminal showing you the line described below that installs DDEV and the required libraries.

DDEV is a Docker-based PHP development environment that streamlines the creation and management of resources required by a Craft project. This tutorial uses Homebrew to install DDEV but other methods are available through the documentation provided in the button below.

To install DDEV using Homebrew, open Terminal and run the commands listed below.

brew install drud/ddev/ddev

brew upgrade ddev

Once complete, run the following command:

mkcert -install

Step Four: Set the current directory for your project

A screenshot of Terminal showing you how to set the current directory.

In Terminal, set the current directory to that which you wish to create your project.

Step Five: Create DDEV Configuration Files

A screenshot of Terminal running DDEV Config.

In Terminal, run the following line:

ddev config --project-type=craftcms

If asked for the document root, make sure you enter web.

If it does not come up, as can occur, open the config.yaml found at .ddev/config.yaml and change line 3 to state docroot:web. If you do not do this you will get a 403 forbidden when launching the project.

Step Six: Create the project

A screenshot of Terminal showing the project being created.

We recommend creating a new Craft CMS project from the official starter project by running the following line in Terminal.

ddev composer create -y --no-scripts --no-install craftcms/craft

Step Seven: Boot up development environment

A screenshot of Terminal running ddev start.

In Terminal, run the following line:

ddev start

Step Eight: Upgrade dependencies

A screenshot of Terminal running ddev composer update.

In Terminal, run the following line to install the latest dependencies:

ddev composer update

Step Nine: Install Craft

A screenshot of Terminal of the process behind ddev install craft.

In Terminal, run the following line to install Craft. For more information read the guide provided in the link below.

ddev craft install

Step Ten: Launch the project & Complete the setup

A screenshot of the Craft CMS Starter up and running.

In Terminal run the line found below, this will launch the website where the project is held.

ddev launch

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.

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