Craft CMS Installation and Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Craft CMS Installation and Setup
Simple
from 1 business day to 3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Installation and Configuration of Craft CMS

Craft CMS is installed via Composer. Requirements: PHP 8.2+, MySQL 8.0+ or PostgreSQL 13+, PHP extensions: imagick/gd, intl, fileinfo, mbstring.

Installation

composer create-project craftcms/craft my-project
cd my-project
php craft setup
# Answer questions: database host, name, user, password
# Creates .env and runs migrations

Project Structure

my-project/
├── config/
│   ├── app.php          # application settings
│   ├── db.php           # database
│   ├── general.php      # main settings
│   └── routes.php       # custom routes
├── modules/             # custom Yii2 modules
├── templates/           # Twig templates
│   ├── _layouts/
│   ├── _components/
│   └── index.twig
├── web/                 # document root
│   └── index.php
└── .env

Main Configuration

// config/general.php
return [
  '*' => [
    'cpTrigger' => 'manage', // instead of standard /admin
    'defaultWeekStartDay' => 1, // Monday
    'omitScriptNameInUrls' => true,
    'useEmailAsUsername' => true,
    'translationDebugOutput' => false,
    'maxRevisions' => 10,
  ],
  'production' => [
    'allowAdminChanges' => false, // forbid schema changes in prod
    'allowUpdates' => false,
    'backupOnUpdate' => false,
    'devMode' => false,
  ],
  'dev' => [
    'devMode' => true,
    'allowAdminChanges' => true,
  ],
];

Environment Variables (.env)

CRAFT_ENVIRONMENT=dev
CRAFT_APP_ID=CraftCMS--my-project
CRAFT_SECURITY_KEY=generated-secure-key

DB_DRIVER=mysql
DB_SERVER=127.0.0.1
DB_PORT=3306
DB_DATABASE=craftcms_dev
DB_USER=craftcms
DB_PASSWORD=password
DB_SCHEMA=public
DB_TABLE_PREFIX=

PRIMARY_SITE_URL=http://localhost:8080
ASSET_BASE_URL=https://cdn.mysite.com

Vite Setup for Assets

composer require nystudio107/craft-vite
// vite.config.ts
import { defineConfig } from 'vite';
import ViteRestart from 'vite-plugin-restart';
import { craftCmsViteConfig } from '@nystudio107/vite';

export default defineConfig({
  ...craftCmsViteConfig,
  build: { manifest: true, outDir: './web/dist' },
  server: { port: 3000, strictPort: true },
});
{# In layout #}
{{ craft.vite.script('src/js/app.ts') }}
{{ craft.vite.stylesheet('src/css/app.pcss') }}

Project Config

Craft stores structure configuration (sections, fields, entry types) in YAML files in config/project/. This allows managing structure through Git:

php craft project-config/apply   # apply config from Git
php craft project-config/diff    # view differences

In production allowAdminChanges: false — changes only through deploy, not UI.

Installation and basic configuration of Craft CMS takes 4–8 hours.