Sylius (Symfony) 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
Sylius (Symfony) Installation and Setup
Medium
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

Installing and Configuring Sylius (Symfony)

Sylius installs via Composer as a Symfony application. There are two options: sylius/sylius-standard (full stack with AdminUI and storefront) and separate components for embedding in an existing Symfony application. For a new online store — always use sylius-standard.

System Requirements

  • PHP 8.1+ (8.2 recommended; 8.3 support with Sylius 2.x)
  • Composer 2.x
  • PostgreSQL 13+ or MySQL 8.0+
  • Node.js 18+ (asset building)
  • Redis (Symfony Messenger, caching, sessions)
  • Elasticsearch 7/8 (optional, for search via bitbag/elasticsearch-plugin)

Creating Project

composer create-project sylius/sylius-standard my_shop "~2.0"
cd my_shop

Sylius 2.0 — current stable version. For PHP 8.1 with minimal stack:

composer create-project sylius/sylius-standard my_shop "~1.13"

Setting up .env

# .env.local
APP_ENV=dev
APP_SECRET=your_32_char_secret_here

DATABASE_URL="postgresql://sylius:[email protected]:5432/sylius?serverVersion=16&charset=utf8"

MAILER_DSN=smtp://user:[email protected]:587?encryption=tls&auth_mode=login

MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages

# For admin UI
SYLIUS_ADMIN_ROUTE_PREFIX=/admin

# Optional
ELASTICSEARCH_URL=http://localhost:9200

Initialization

# Database
bin/console doctrine:database:create
bin/console doctrine:migrations:migrate --no-interaction

# Load initial data: countries, currencies, locales, shipping types
bin/console sylius:install:setup

# Load example data (dev only)
bin/console sylius:fixtures:load

sylius:install:setup — interactive wizard. Asks:

  • Default locale
  • Default currency
  • Administrator data

Directory Structure

my_shop/
├── config/
│   ├── packages/
│   │   ├── sylius_core.yaml
│   │   ├── sylius_product.yaml
│   │   └── sylius_payment.yaml
│   └── routes/
│       ├── sylius_shop.yaml
│       └── sylius_admin.yaml
├── src/
│   ├── Entity/              # Custom entities (extends Sylius)
│   │   ├── Product/
│   │   ├── Order/
│   │   └── Customer/
│   ├── Repository/
│   ├── Form/
│   └── EventListener/
├── templates/
│   └── bundles/
│       └── SyliusShopBundle/   # Template overrides
└── migrations/

Configuring Channels via Fixtures

For reproducible configuration — Suite fixtures:

# config/fixtures/channels.yaml
sylius_fixtures:
    suites:
        default:
            fixtures:
                channel:
                    options:
                        custom:
                            web_en:
                                name: "Online Store"
                                code: "WEB_EN"
                                locales:
                                    - "en_US"
                                    - "fr_FR"
                                currencies:
                                    - "USD"
                                countries:
                                    - "US"
                                    - "CA"
                                    - "MX"
                                hostname: "myshop.com"
                                contact_email: "[email protected]"
                                enabled: true
                                default_locale: "en_US"
                                base_currency: "USD"
                                theme_name: ~
                                tax_calculation_strategy: "order_items_based"
                                skipping_payment_step_allowed: false
                                skipping_shipping_step_allowed: false
                                account_verification_required: false
bin/console sylius:fixtures:load --suite=default

Building Assets

# Install npm dependencies
yarn install  # or npm install

# Dev
yarn dev

# Production
yarn build

Sylius 1.x uses Webpack Encore. Sylius 2.x — Vite or Webpack (depending on version).

Docker Compose

# docker-compose.yaml
version: "3.9"
services:
  php:
    image: php:8.2-fpm
    volumes:
      - .:/app
      - vendor:/app/vendor
    environment:
      - APP_ENV=prod

  nginx:
    image: nginx:alpine
    ports: ["80:80"]
    volumes:
      - .:/app
      - ./docker/nginx.conf:/etc/nginx/conf.d/default.conf

  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: sylius
      POSTGRES_USER: sylius
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes: [pgdata:/var/lib/postgresql/data]

  redis:
    image: redis:7-alpine

  worker:
    image: php:8.2-cli
    command: php /app/bin/console messenger:consume async catalog_promotions
    volumes:
      - .:/app
    depends_on: [postgres, redis]

volumes:
  pgdata:
  vendor:
# docker/nginx.conf
server {
    listen 80;
    root /app/public;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ \.php$ {
        fastcgi_pass php:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
    }
}

Configuring Payment Methods

Payment methods are added via Admin UI (Configuration → Payment Methods) or fixtures. Respective plugins are required:

# Stripe
composer require sylius/stripe-plugin

# PayPal
composer require payum/paypal-express-checkout-nvp-php

# Community gateways
composer require prometeytrading/sylius-yookassa-plugin

Configuring Symfony Messenger for Queues

# config/packages/messenger.yaml
framework:
    messenger:
        transports:
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                retry_strategy:
                    max_retries: 3
                    delay: 1000
                    multiplier: 2
            catalog_promotions:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    stream: sylius_catalog_promotions

        routing:
            'Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionState': catalog_promotions
            'Sylius\Bundle\CoreBundle\CatalogPromotion\Command\ApplyCatalogPromotionsOnVariants': catalog_promotions

Checklist After Installation

  • Database created, migrations applied
  • Initial data loaded (sylius:install:setup)
  • Channels configured (URL, currency, locales)
  • Shipping methods created
  • Tax categories and rates configured
  • Payment methods added and active
  • Assets built (yarn build)
  • Symfony Messenger Worker running
  • Admin UI accessible (/admin)
  • Shop API responding (/api/v2/shop/products)