PHPackages                             evanwarner/craft-boilerplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. evanwarner/craft-boilerplate

ActiveProject[Framework](/categories/framework)

evanwarner/craft-boilerplate
============================

A Craft CMS boilerplate build.

v6.0.2(2y ago)016[2 issues](https://github.com/evanwarner/craft-boilerplate/issues)UnlicenseCSS

Since May 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/evanwarner/craft-boilerplate)[ Packagist](https://packagist.org/packages/evanwarner/craft-boilerplate)[ RSS](/packages/evanwarner-craft-boilerplate/feed)WikiDiscussions develop Synced today

READMEChangelog (10)DependenciesVersions (19)Used By (0)

Boilerplate for Craft CMS projects
==================================

[](#boilerplate-for-craft-cms-projects)

This project serves as a boilerplate to generate a new Craft CMS project through `composer create-project`. It is an opinionated configuration made specifically for how I like to build sites with Craft.

The boilerplate creates a Craft 4.x build with a [DDEV](https://ddev.com) configuration for local development. If you prefer a different local development environment than DDEV, you're free to adjust the setup process accordingly.

---

How to use the boilerplate
--------------------------

[](#how-to-use-the-boilerplate)

To generate a new Craft CMS project with this package, run the following, where `` is the system path you want to be the project root:

```
composer create-project evanwarner/craft-boilerplate

```

**Note:** As part of the project creation process this file will be renamed to `SETUP.md`, while the file `README-site.md` will become `README.md`, as it is intended to be the README file that lives on with the generated project.

### Project Setup

[](#project-setup)

The following should be completed immediately after generating a new project. Once complete, this file can be deleted.

#### GIT

[](#git)

1. `cd` into the project root
2. `git init`
3. `git commit --allow-empty -m "Initial commit"`
4. Add desired git remote (assuming named `origin`)
5. `git push -u origin master`
6. `git checkout -b develop`

#### Structure

[](#structure)

1. Rename `/webroot` to an appropriate name for this project (to match the production server)
    - Update the `docroot` config in `/.ddev/config.yaml` to match
    - Update the `config.webroot` variable in `package.json` to match
    - Update the `* > aliases > @webroot` path in `/craft/config/general.php` to match
    - Update the paths in `.gitignore` to match
    - Update the paths in the *Getting Started* section in `README.md` to match
2. **(Optional)** You may rename `/craft` to a preferred name for this project
    - Update the `composer_root` config in `/.ddev/config.yaml` to match
    - Update the `web_environment > CRAFT_CMD_ROOT` config in `/.ddev/config.yaml` to match
    - Update the `config.craft` variable in `package.json` to match
    - Update the shared bootstrap `require` path in `/[webroot]/index.php` to match:
        - `require dirname(__DIR__) . '/[craft]/bootstrap.php';`
    - Update the paths in `.gitignore` to match
    - Update the paths in the *Getting Started* section in `README.md` to match
    - Update the paths in the *File Organization* section in `README.md` to match
    - Be aware of this change as you follow the remaining steps in this setup
3. Ensure permissions of these directories
    - `chmod 774 /[craft]/storage`
    - `chmod 774 /[craft]/vendor`
4. Ensure permissions on the craft cli executable
    - `chmod 755 /[craft]/craft`

#### Project Configuration

[](#project-configuration)

1. Edit the *Project Name* and *Project Description* in `README.md`
2. Edit the `name` config in `/.ddev/config.yaml`
3. Set the `name` and `description` in `package.json`
4. Set the `name` and `description` in `/[craft]/composer.json`
5. Set the `CRAFT_APP_ID` in `/[craft]/.env`
6. Set the `SYSTEM_NAME` in `/[craft]/.env`
7. Set the `SITE_NAME` in `/[craft]/.env`
8. Configure the project domains
    - Edit the project domain under the `additional_fqdns` config in `/.ddev/config.yaml`
    - Set the `SITE_URL` in `/[craft]/.env`
    - Set the `start_url` in `/src/manifest.json` to the production domain
9. Set the `SYSTEM_EMAIL` in `/[craft]/.env`
10. Set the `SYSTEM_SENDER_NAME` in `/[craft]/.env`
11. Set the `SYSTEM_REPLY_TO_EMAIL` in `/[craft]/.env`
12. Set the `TEST_EMAIL` in `/[craft]/.env`
13. Comment out or delete the www and https rewrite settings in `/src/.htaccess` as desired

#### Environment Setup

[](#environment-setup)

1. From the project root run `npm run dev` to compile source files and watch for changes

#### DDEV

[](#ddev)

1. Adjust the additional environment configs (versions, ports) in `/.ddev/config.yaml` as desired
2. From the project root run `ddev start`

#### Craft Setup

[](#craft-setup)

1. Create a `CRAFT_SECURITY_KEY` in `/[craft]/.env`
    - `ddev craft setup/security-key` (or generate one manually)
2. Run the Craft installation at `http://[local hostname]/manage`
    - Set the **Name** of the primary site to `$SITE_NAME`
    - Set the **URL** of the primary site to `$SITE_URL`
3. In **Settings &gt; General** set the system **Time Zone** appropriately
4. In **Settings &gt; Sites** set the **Name** of the site group as desired

#### GIT Development Branch

[](#git-development-branch)

1. Delete this file.
2. `git add -A`
3. `git commit -m "Add and configure site boilerplate"`
4. `git push -u origin develop`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~73 days

Recently: every ~130 days

Total

17

Last Release

1013d ago

Major Versions

v1.3.0 → v2.0.02020-09-05

v2.1.0 → v3.0.02021-04-27

v3.0.0 → v4.0.02022-02-23

v4.0.1 → v5.0.02023-07-06

v5.0.0 → v6.0.02023-07-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6453842?v=4)[Evan Warner](/maintainers/evanwarner)[@evanwarner](https://github.com/evanwarner)

---

Top Contributors

[![evanwarner](https://avatars.githubusercontent.com/u/6453842?v=4)](https://github.com/evanwarner "evanwarner (129 commits)")

### Embed Badge

![Health badge](/badges/evanwarner-craft-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/evanwarner-craft-boilerplate/health.svg)](https://phpackages.com/packages/evanwarner-craft-boilerplate)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M529](/packages/laravel-passport)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
