Used to create new projects using Craft CMS at XM Media.
- Create a new project:
composer create-project xm/starter_craft project-name --stability=dev --no-install --remove-vcs
- Update
composer.json:name,license(likelyproprietary) anddescription - Update
package.json:name,version,git.url,license,private,script.dev-server - Setup dev server:
- If using InterWorx, upload
setup_dev.shand run:sh ./setup_dev.sh - Upload the files (exclude files that are OS dependent like
node_modules&.envor that are only for editing like.ideaand.gitand a lot of what's in.gitignore). - Install Composer (if not already installed)
- Install PHP packages/vendors:
php composer.phar install - Add
.env(copy.env.exampleand update). - Run
. ./node_setup.sh(this will setup node & install the JS packages – requires yarn to be installed). - Run
yarn devoryarn build(for production) to compile JS & CSS files. - Give executable perms to bin dir:
chmod u+x craft - Ensure you have lando running.
- Within
lando ssh, install craft:./craft install/craft
- If using InterWorx, upload
- Remove or update the
LICENSEfile. - Install Composer locally (if not installed globally).
- Composer install & update (locally):
composer install && composer update - Run
yarn && yarn upgradelocally. - Upload
composer.lockandyarn.lockand on the server, runphp composer.phar installand. ./node_setup.shagain. - Find and make changes near
@todo-craftcomments throughout the site. All changed files will need to uploaded to the server. - Create new favicons: realfavicongenerator.net
- Set the email Subject Text for contact form submissions in Settings > Contact Form (under Plugins).
- Delete starter files:
README.md(or update) andTEMPLATES.md. - Update site name:
- In Settings -> General
- In Settings -> Sites
- Globals -> Site Information
Dev site can be accessed at https://[domain]/
Craft admin is located at /admin
- PHP 8.5+
- MySQL 8.0
- Node 22
- Yarn v4
- Production JS/CSS build:
yarn build - Dev JS/CSS build:
yarn dev - Dev JS/CSS watch:
yarn watch(files will not be versioned) - Dev JS/CSS HMR server:
yarn dev-server(see below) - JS Tests (Jest):
yarn test:unit - E2E Tests (Cypress):
yarn test:e2e - Linting:
- JS (ESLint):
yarn lint:jsoryarn lint:js:fix - CSS:
yarn lint:cssoryarn lint:css:fix
- JS (ESLint):
- PHP Tests (PhpUnit):
composer test- no memory limit
php -d memory_limit=-1 bin/simple-phpunit - with coverage (HTML)
composer test:coverage
- PHP CS: (must be installed first)
- Dry run:
composer cs - Fix:
composer cs:fix
- Dry run:
- PHP Static Analysis (PHPStan):
composer static
- Frontend – full list of dependencies can be found in package.json
- Vue 3 – frontend framework
- Vite – frontend build tool and dev server with HMR
- Tailwind CSS 4 – utility-first styling framework
- @tailwindcss/typography – prose styling plugin
- PostCSS – transforms CSS
- postcss-env-function – environment variable support in CSS
- postcss-nesting – CSS nesting support
- ESLint – checks JS for conventions & errors
- Stylelint – checks CSS for conventions & errors
- SVGO – optimizes SVG files
- Backend – full list of dependencies can be found in composer.json
- Craft CMS 5 – CMS framework
- Twig – server-side templating language
- CKEditor – rich text editor plugin for Craft
- Contact Form – contact form plugin for Craft
- Contact Form Honeypot – spam protection for contact forms
- Contact Form Extensions – additional contact form features
- SEO (Ether) – SEO plugin for Craft
- Field Manager (Verbb) – field management plugin for Craft
- oEmbed – oEmbed support for Craft
- Craft Vite – Vite integration for Craft CMS
- PHPStan – static analysis of PHP
- GitLab – CI/CD and deployment
- Dev Tools
- Change version in
composer.json. - Update the PHP version in the following files:
.lando.yml–config.phpandservices.appserver.type(if the Symfony recipe doesn't support the new version, you must override the appserver service withtype: php:X.X)setup_dev.sh– 4 placessetup_prod.sh– 4 places.gitlab-ci.yml– 3 places (default image,SERVER_PHP_PATH, andphp-fpmservice name).php-cs-fixer.dist.php– add the new version or update the@PHP8#Migrationversion to match the current version.
- Run
lando rebuildto rebuild the Lando container with the new PHP version. - Run
lando composer updateorcomposer updateto update the PHP dependencies. If running locally without Lando, ensure your local PHP version matches the new version. - Update version in
README.mdandCLAUDE.md.