Craft CMS is a self-hosted, open-source content management system built on PHP, Yii2, and Twig, designed for developers and content teams who need full control over content structure and delivery. It solves the problem of rigid, assumption-laden CMS platforms by offering a clean-slate approach to content modeling, enabling bespoke digital experiences—from marketing sites to multinational e-commerce stores—without forcing content into predefined templates.
Craft supports MySQL and PostgreSQL for data storage, provides a built-in GraphQL API for headless applications, and integrates with cloud storage providers like Amazon S3 and Google Cloud Storage. It features a plugin ecosystem with hundreds of extensions, a multi-site and multi-language localization system, and is deployable on any PHP server or via Craft Cloud for managed hosting.
What You Get
- Custom Fields - Define any content structure with a wide range of field types managed centrally, enabling precise content modeling without constraints.
- Live Preview - See real-time previews of content as it’s edited, with shareable preview URLs to collaborate with stakeholders before publishing.
- Twig Templating - Use the elegant Twig templating engine from Symfony to build dynamic, secure, and reusable front-end templates with full control over markup.
- Relationships - Create bidirectional, any-to-any relationships between entries, assets, and users, with inline editing available directly from the context of the current item.
- Asset Management with Cloud Storage - Upload and manage files with custom fields, and store assets on Amazon S3, Google Cloud Storage, or Craft Cloud without code changes.
- Headless Mode with GraphQL API - Expose content via a fully auto-generated GraphQL API for use in React, Vue, or native mobile apps without building a custom backend.
- Multi-site & Multi-language Localization - Manage content across unlimited sites, languages, and locales with field-level translation and locale-specific content variations.
- User Management with Granular Permissions - Define roles and permissions for groups or individuals, including public registration and custom user groups in Craft Pro.
- Matrix Fields with Nested Entries - Build complex, nested content structures using Matrix fields that support cards, entry lists, and block views for rich content authoring.
- Plugin Store with 100+ Extensions - Extend functionality with official and third-party plugins for e-commerce, SEO, analytics, and integrations like Mailchimp and Salesforce.
- Internationalized Control Panel - The admin interface is translated into 25 languages and supports hundreds of locales for global content teams.
- Craft Commerce Integration - Build fully customized e-commerce experiences with a native, extensible commerce platform built on the same framework.
Common Use Cases
- Building a multinational marketing site - A global brand uses Craft’s multi-site and localization features to manage 12 language versions of their site with shared content and localized variations.
- Developing a headless content platform for a mobile app - A startup uses Craft’s built-in GraphQL API to serve content to iOS and Android apps without maintaining a separate backend.
- Running a high-traffic e-commerce store with custom product variants - An online retailer uses Craft Commerce to manage complex product options, inventory, and tax rules across regions.
- Powering a publisher’s digital magazine with rich content blocks - A media company uses Matrix fields with nested entries to create magazine-style layouts with embedded videos, galleries, and author bios.
Under The Hood
Architecture
- Built on Yii2 with clear separation of concerns between controllers, services, and models, ensuring business logic is delegated to dedicated service classes
- Event-driven design with a centralized event system and custom events that enable loose coupling between core components and plugins
- Dependency injection via a singleton service container that resolves complex dependencies without tight coupling
- Modular asset management through encapsulated AssetBundle classes with explicit dependencies and automatic translation registration
- GraphQL integration with typed schema definitions and a registry system that enforces consistency across API endpoints
- Extensible plugin and translation infrastructure that allows third-party extensions without modifying core code
Tech Stack
- PHP 8.2+ backend powered by Yii2, enhanced with Symfony components for serialization, configuration, and property access
- Twig templating for dynamic views and Composer-managed dependencies including custom plugins and Yii2 extensions
- Webpack-based frontend build system with Vue 2.6, SCSS, and TypeScript, using custom presets for consistent asset compilation
- Playwright and Codeception for comprehensive end-to-end and unit testing with dedicated modules for database state management
- Modern frontend tooling including Tailwind CSS, Prettier, Stylelint, and Husky to enforce code quality across UI components
- Headless CMS capabilities via GraphQL, supported by a dedicated GraphiQL interface for API exploration and development
Code Quality
- Extensive unit test coverage with data providers that validate edge cases, validation rules, and UI behaviors
- Strong type safety through strict PHP 8.1+ type declarations across models, helpers, and method signatures
- Robust error handling leveraging framework-level validation and exception systems with consistent patterns
- Clean, consistent naming conventions and well-structured code that follows Yii2 best practices
- Comprehensive test suites for core systems including element queries, relational data handling, and UI helpers
- Linting and code quality practices embedded in development workflow through structured, documented code and framework adherence
What Makes It Unique
- Dynamic GraphQL mutation generation that auto-creates type-safe content mutations based on global sets
- Advanced eager-loading system with nested lazy-loading and conditional hydration to prevent N+1 queries
- Field-level relation management with site-aware persistence and sort-order tracking for multi-site content
- Client-side slug generation with Unicode-aware processing and configurable ASCII fallback for internationalized URLs
- Plugin screenshot modal with zoomable Swiper and dynamic aspect-ratio resizing for immersive asset previews
- Unified element action system with dynamic button generation and AJAX-driven bulk operations across content types