Grav CMS Tutorials — Complete Project-Based Guide
In this tutorial series, you'll learn Grav CMS from zero by building a real project — a developer documentation site.
Grav is a flat-file content management system — it uses Markdown files instead of a database. Unlike WordPress (database-driven) or Drupal (enterprise-grade), Grav is designed for speed, simplicity, and Git-friendly workflows. Every page is a folder with a Markdown file inside. No database setup, no complex queries, just files.
What You'll Learn
- Install Grav locally and configure PHP and web server prerequisites
- Create content with pages, collections, modular pages, and advanced frontmatter
- Build dynamic templates with Twig filters, macros, inheritance, and debugging
- Customize themes with blueprints, assets, inheritance, and multilingual strings
- Develop plugins using events, forms, admin widgets, and CLI commands
- Implement multilingual sites, user management, media handling, and REST APIs
- Optimize caching, performance, security, and Git-based deployment workflows
How to Use This Series
Each lesson builds on the previous one. Start with Module 1 if you are new to Grav, or jump to any module that matches your skill level.
Module 1: Getting Started
| # | Lesson | What You'll Learn |
|---|---|---|
| 01 | What is Grav | Flat-file CMS, comparison with WordPress and Drupal |
| 02 | Installation | PHP setup, Grav download, built-in PHP server |
Module 2: Content & Theming
| # | Lesson | What You'll Learn |
|---|---|---|
| 03 | Pages & Content | Home page, About page, Markdown, folder structure |
| 04 | Navigation | Custom menus, page ordering, breadcrumbs |
| 05 | Twig Templating | Template variables, includes, page content rendering |
| 06 | Themes | Theme structure, custom theme development |
| 07 | Taxonomy & Blog | Tags, categories, blog listing page |
| 08 | Plugins & Admin | Admin panel, essential plugins |
| 09 | Configuration & Caching | Production-ready performance tuning |
| 10 | Deployment & Maintenance | Live deployment to production |
Module 3: Advanced Content & Pages
| # | Lesson | What You'll Learn |
|---|---|---|
| 11 | Custom Page Types | Modular pages, folder types |
| 12 | Page Meta & Frontmatter | Advanced YAML, overrides, image headers |
| 13 | Page Collections | List pages, children filters, modular collections |
| 14 | Markdown & Shortcodes | Grav markdown extras, custom shortcode plugins |
Module 4: Advanced Twig
| # | Lesson | What You'll Learn |
|---|---|---|
| 15 | Twig Filters & Functions | Date, translate, repeat, range, batch |
| 16 | Twig Macros | Reusable template blocks, import and export |
| 17 | Twig Inheritance | Multi-level extends, blocks, embeds |
| 18 | Twig Debugging | Dump, debug bar, variables inspector |
| 19 | Custom Twig Extensions | Register custom filters in plugins |
Module 5: Advanced Themes
| # | Lesson | What You'll Learn |
|---|---|---|
| 20 | Theme Configuration | Blueprints.yaml, theme.yaml, form fields |
| 21 | Theme Assets | CSS/JS pipeline, asset merging, minification |
| 22 | Theme Inheritance | Child themes, overriding parent templates |
| 23 | Theme Languages | Multilingual theme strings, translations |
Module 6: Advanced Plugins
| # | Lesson | What You'll Learn |
|---|---|---|
| 24 | Plugin Architecture | Folder structure, events, DI container |
| 25 | Plugin Events | onPageContentRaw, onTwigSiteVariables, event reference |
| 26 | Plugin Forms | Form state, validation, file uploads, multi-step |
| 27 | Plugin Admin | Custom admin pages, widgets, dashboard panels |
| 28 | Plugin CLI | Console commands, task scheduling, cron integration |
Module 7: Advanced Features
| # | Lesson | What You'll Learn |
|---|---|---|
| 29 | Multilingual | Language switcher, translations workflow, fallbacks |
| 30 | User Management | Login plugin, permissions, user accounts |
| 31 | Media Handling | Image manipulation, thumbnails, media aliases |
| 32 | Grav API | REST API, JSON responses, external integrations |
| 33 | Web Services | Webhooks, OAuth, SSO, LDAP authentication |
| 34 | E-commerce | SimpleCart, payment gateways, product management |
Module 8: Performance, Security & Deployment
| # | Lesson | What You'll Learn |
|---|---|---|
| 35 | Caching Deep Dive | Cache types, cache warming, cache busting |
| 36 | Performance Optimization | Page speed, CDN, image optimization |
| 37 | Security | Hardening, .htaccess, CSP headers, XSS prevention |
| 38 | Git Workflow | Git-based deployment, CI/CD, multi-environment |
| 39 | CLI Tools | bin/grav commands, automated tasks, maintenance |
| 40 | Production Deployment | Nginx config, SSL, monitoring, scaling |
What You'll Build
By the end of this series, you will build a complete developer documentation site with Grav:
- A fully themed documentation site with custom Twig templates
- Blog functionality with tags, categories, and pagination
- Admin panel for non-technical content editors
- Multilingual support for international audiences
- Automated Git-based deployment pipeline
- Production server with caching, security, and monitoring
Let's begin with Lesson 1.
Published Topics
All 40 topics in Grav CMS Tutorials — Complete Project-Based Guide are published.