SyliusCon 2025
Early Bird Deal
LogoLogo
🛣️ Roadmap💻 Sylius Demo💬 Community Slack
  • Sylius Documentation
  • Sylius Plugins
  • Sylius Stack
  • đź“–Sylius 2.0 Documentation
    • Organization
      • Release Cycle
      • Backwards Compatibility Promise
      • Sylius Team
      • Sylius Roadmap
  • Getting Started with Sylius
    • Installation
    • Basic Configuration
    • Shipping & Payment
    • First Product
    • Customizing the Shop
    • Customizing Business Logic
    • Using API
    • Installing Plugins
    • Deployment
    • Summary
  • The Book
    • Introduction to Sylius
    • Installation
      • System Requirements
      • Sylius CE Installation
        • Sylius CE Installation with Docker
      • âž•Sylius Plus Installation
      • Upgrading Sylius CE
      • Upgrading Sylius Plus
    • Architecture
      • Architecture Overview
      • Architectural Drivers
      • Resource Layer
      • State Machine
      • Translations
      • E-Mails
      • Contact
      • Fixtures
      • Events
    • Configuration
      • Channels
      • Locales
      • Currencies
    • Customers
      • Customer & ShopUser
      • âž•Customer Pools
      • AdminUser
      • Addresses
        • Countries
        • Zones
        • Addresses
        • Address Book
    • Products
      • Products
      • Product Reviews
      • Product Associations
      • Attributes
      • Pricing
      • Catalog Promotions
      • Taxons
      • Inventory
      • âž•Multi-Source Inventory
      • Search
    • Carts & Orders
      • Orders
      • Cart flow
      • Taxation
      • Adjustments
      • Cart Promotions
      • Coupons
      • Payments
      • đź§©Invoices
      • Shipments
    • Support
    • Contributing
      • Contributing Code
        • Submitting a Patch
        • ⚠️Security Issues
        • Coding Standards
        • Conventions
        • Sylius License and Trademark
      • Contributing Translations
      • Key Contributors
  • The Customization Guide
    • Customizing Models
      • How to add a custom model?
      • How to add a custom translatable model?
    • Customizing Forms
      • How to add a live form for a custom model?
    • Customizing Styles
    • Customizing Validation
    • Customizing Menus
    • Customizing Templates
    • Customizing Translations
    • Customizing Flashes
    • Customizing State Machines
    • Customizing Grids
    • Customizing Fixtures
    • Customizing API
    • Customizing Serialization of API
    • Customizing Payments
      • How to integrate a Payment Gateway as a Plugin?
  • 🧑‍🍳The Cookbook
  • How to resize images?
  • How to add one image to an entity?
  • How to add multiple images to an entity?
  • Sylius 1.X Documentation
    • đź““Sylius 1.x Documentation
Powered by GitBook
LogoLogo

Developer

  • Community
  • Online Course

About

  • Team

© 2025 Sylius. All Rights Reserved

On this page
  • Setting up a fresh Sylius project
  • Building front-end
  • Installing Sylius
  • Configuring Mailer
  • Accessing the Shop
  • How to start developing? - Project Structure
  • Running asynchronous tasks
  • Contributing

Was this helpful?

Edit on GitHub
  1. The Book
  2. Installation

Sylius CE Installation

PreviousSystem RequirementsNextSylius CE Installation with Docker

Last updated 6 months ago

Was this helpful?

Setting up a fresh Sylius project

The recommended way of creating a new Sylius-based project is to use our project template.

composer create-project sylius/sylius-standard AcmeStore

This command will create an AcmeStore directory with the downloaded latest version of Sylius Standard, and install its dependencies. Before we go further, we have to enter the AcmeStore directory.

cd AcmeStore

By default Sylius comes with the latest LTS version of Symfony. If you want to change it, you can do it with the following commands executed from the project's root directory:

composer config extra.symfony.require "<version>" # e.g. "6.3.*"
composer update

Building front-end

Before we perform an initial installation of Sylius, we need to have our front-end assets built. People often use Yarn over npm due to features like workspaces, offline caching, and faster installation times, which can be particularly useful in large-scale or complex projects. However, npm has improved significantly over time and can also be a great choice for managing your front-end packages.

npm install
npm run build
yarn install
yarn build

Installing Sylius

To make installing Sylius easier, we provide an interactive process for it. But before we start the installer, we need to define the database's credentials. For the local development, the best choice is to use local .env files.

To define your database connection string, create the .env.local file with the following content:

.env.local
DATABASE_URL=mysql://<username>:<password>@<host>/<your_database_name>_%kernel.environment%?serverVersion=<your_db_version>&charset=utf8
.env.local
DATABASE_URL=mysql://<username>:<password>@<host>/<your_database_name>_%kernel.environment%?serverVersion=mariadb-<your_db_version>&charset=utf8
.env.local
DATABASE_URL=pgsql://<username>:<password>@<host>/<your_database_name>_%kernel.environment%?serverVersion=<your_db_version>&charset=utf8

Specific Sylius versions may support various Symfony versions. To make sure the correct Symfony version will be installed (Symfony 7.0 for example) use:

composer config extra.symfony.require "^7.0"
composer update

Otherwise, you may face the problem of having Symfony components installed in the wrong version.

Once you have the database configured, we can run the interactive installer by running the below command in the project's root directory:

bin/console sylius:install

In the first step, Sylius checks whether the system meets the requirements. The second step is dedicated to setting up the database we configured earlier. When the database schema is ready, we can choose whether we want to install the demo data. Next we go through a basic shop configuration and generating tokens for the Sylius API. At the end, Sylius will automatically install assets from the already installed bundles and plugins.

During the sylius:install command you will be asked to provide important information, but also its execution ensures that the default currency (USD) and the default locale (English - US) are set. They can be changed later, respectively in the “Configuration > Channels” section of the admin and in the config/services.yaml file. If you want to change these before running the installation command, set the locale and sylius_installer_currency parameters in the config/services.yaml file. From now on all the prices will be stored in the database in USD as integers, and all the products will have to be added with a base american english name translation.

Configuring Mailer

In order to send emails you need to configure Mailer Service. Basically there are multiple ways to do it:

  • (deprecated) Use SwiftMailer with this short configuration:

  1. Create an account on a mailing service.

  2. In your .env file modify/add the MAILER_URL variable.

MAILER_URL=gmail://username:password@local

Email delivery is disabled for test, dev and staging environments by default. The prod environment has delivery turned on.

Accessing the Shop

We strongly recommend using the Symfony Local Web Server by running the symfony server:start command and then accessing https://127.0.0.1:8000 in your web browser to see the shop.

You can log to the administrator panel located at /admin with the credentials you have provided during the installation process.

How to start developing? - Project Structure

After you have successfully gone through the installation process of Sylius-Standard you are probably going to start developing within the framework of Sylius.

In the root directory of your project you will find these important subdirectories:

  • config/ - here you will be adding the yaml configuration files including routing, security, state machines configurations etc.

  • var/log/ - these are the logs of your application

  • var/cache/ - this is the cache of you project

  • src/ - this is where you will be adding all you custom logic in the App

  • public/ - there you will be placing assets of your project

Running asynchronous tasks

To enable asynchronous tasks (for example for Catalog Promotions), remember about running messenger consumer in a separate process, use the command:

 php bin/console messenger:consume main

Contributing

We are recommending to use where out of the box, you can deliver emails by configuring the MAILER_DSN variable in your .env file.

In Symfony Mailer use the

You can learn more about configuring mailer service in

Get to know more about using Symfony Local Web Server. If you are using a built-in server check .

As it was mentioned before we are basing on Symfony, that is why we’ve adopted its approach to architecture. Read more . Read also about the .

For production environments, we suggest usage of more robust solution like Supervisor, which will ensure that the process is still running even if some failure will occur. For more information, please visit .

You can learn more about Catalog Promotions .

If you would like to contribute to Sylius - please go to the .

Sylius Standard
Symfony Mailer
3rd Party Transports
How to configure mailer?
in the Symfony server documentation
here
in the Symfony documentation
best practices while structuring your project
Symfony documentation
here
Contribution Guide