Craft 3 Documentation

Directory Structure

When you download a fresh copy of Craft 3, your project will have the following files and directories:

config/ #

Holds all of your Craft and plugin configuration files, as well as your license.key file.

storage/ #

This is where Craft stores a bunch of files that get dynamically generated at runtime.

Some of the folders you might find in there include:

templates/ #

Your front-end templates go in here.

vendor/ #

This is where all of your Composer dependencies go, including Craft itself, and any plugins you’ve installed via Composer.

web/ #

This directory represents your web root. (This can be renamed if needed.)

.env #

This is your PHP dotenv .env configuration file. It defines sensitive or environment-specific config values that don’t make sense to commit to version control.

.env.example #

This is your PHP dotenv .env file template. It should be used as a starting point for any actual .env files, stored alongside it but out of version control on each of the environments your Craft project is running in.

.gitignore #

Tells Git which files it should ignore when committing changes. #

Standard MIT license, which covers all the code in the craftcms/craft repo, but NOT any Composer-installed libraries in the vendor/ folder. Feel free to delete this file. #

Readme for the craftcms/craft repo. Feel free to delete this file, or replace its contents with something more relevant to your project.

composer.json #

The starting point composer.json file that should be used for all Craft projects.

By default, there will be some settings in here that can safely be changed or removed, including:

composer.lock #

This is a Composer file that tells Composer exactly which dependencies and versions should be currently installed in vendor/.

craft #

This is a command line executable that will bootstrap a Craft console application.

craft.bat #

This is a Windows Command Prompt wrapper for the craft executable.