The in-app guide
This is the same guide as Admin → Help: usage, each admin screen, themes, tags, environment, and install.
Install with the Laravel CLI
Use this when PHP 8.2+ and Composer are already on the machine. SQLite is the default — no extra database required.
1. Prepare the code
composer install
cp .env.example .env
php artisan key:generate
On Windows use copy .env.example .env.
2. Database (optional)
SQLite is already configured. For MySQL 5.7+ / 8.0, create an empty utf8mb4 database and edit .env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cms
DB_USERNAME=cms
DB_PASSWORD=use-a-strong-password
Example: CREATE DATABASE cms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; PHP needs pdo_mysql. Live nginx is under Environment.
3. Install
php artisan cms:install [email protected] --password=YourPass#1
Add --demo for sample sections and entries. You can also pass --site=My site --name=Admin.
4. Run
php artisan serve
Open https://leafcms.top. Admin: https://leafcms.top/admin/login, with the email you set.
You can skip cms:install: after the first two steps, finish in the browser at web install.
Do not edit core files for “when an article is published”. Listen to App\Events\* — see Help → Templates.