- Can I install craftcms/craft in an existing Laravel application with Composer?
- No. craftcms/craft is a Composer project package (type: project), not a library, so requiring it into an existing Laravel app would add a second framework runtime, a second service container, and a competing bootstrapping path in the same process. Install it as a standalone Craft CMS service and connect Laravel to it over HTTP.
- How do I integrate Craft CMS with a Laravel application?
- Use the headless/BFF pattern: Laravel calls Craft through first-party GraphQL (Craft Pro), the Element API plugin, or a thin custom module that returns JSON. Craft owns editorial content, assets, and localization while Laravel stays the system of record for users, commerce, and app state. Expect a network hop and a second deploy target.
- Does craftcms/craft support Laravel 11 or Laravel 12?
- craftcms/craft has no Laravel version dependency because it is not a Laravel package; compatibility lives at the HTTP boundary, so any Laravel release that can call GraphQL or REST works. What actually constrains you is Craft's own stack: PHP 8.2+, MySQL 8+ or PostgreSQL, and Composer 2. Keep the two upgrade streams on separate schedules.
- What are the server requirements for the Craft CMS starter project?
- Craft requires PHP 8.2+, MySQL 8+ or PostgreSQL, and Composer 2. Deploy it as its own service with its own database, release pipeline, and .env file. Sharing a vhost with Laravel is possible for a prototype but conflates failure domains in production.
- Do I need a paid Craft Pro license to use GraphQL with Laravel?
- Yes, first-party GraphQL requires Craft Pro; the free Solo edition is feature-limited. If a Pro license is not approved at the TPM level, scope the integration to the Element API plugin or a custom module exposing JSON instead. Budget for this explicitly, or a headless plan can silently fail at launch.
- Should Craft CMS and Laravel share a database or user table?
- Don't. Keep authentication and sessions entirely in Laravel, and do not share a database, share a user table, or bridge Yii and Laravel sessions. Cross-framework session sharing is the single most common source of pain in this pattern; give Craft its own database and treat users as a Laravel concern.
- How should I cache Craft CMS content in Laravel to avoid slowing page loads?
- Wrap Craft queries in Laravel repository classes returning typed DTOs, then cache results in Redis keyed on Craft's element dateUpdated values or cache tags. Use a stale-while-revalidate pattern so editorial latency never reaches end users. Invalidate from Craft webhooks or a scheduled warmup rather than querying Craft on every request.
- What is the difference between craftcms/craft and craftcms/cms?
- craftcms/craft is the starter skeleton (front controller, Yii2 bootstrap, .env handling, config scaffolding) with type project, while craftcms/cms is the actual CMS dependency. The starter's small star count and low signal score reflect thin scaffolding, not strategic value, so size the bet on Craft itself rather than this repo's metrics.
- How do I deploy Craft CMS alongside a Laravel application in production?
- Run Craft and Laravel as separate services, each with its own database, release pipeline, and .env, and cut over path by path with redirect rules held in Laravel so rollback is a routing change. Version upgrades (Craft 4 to 5, Laravel 11 to 12) will not align, so schedule them independently. Avoid one vhost hosting both apps outside of prototypes.
- How do I test a headless Craft CMS integration from Laravel?
- Test at the HTTP boundary: contract-test your GraphQL queries or JSON endpoints against a staging Craft instance, and use mocked responses in Laravel feature tests for DTO mapping and cache invalidation. Add integration tests that verify cache tags and stale-while-revalidate behavior when content changes. Keep Craft-side custom modules thin, since maintaining them still requires Yii2 fluency.