Installation

The Sylius CMS Plugin provides essential content management capabilities (pages, blocks, sections) for Sylius-based applications.

Supported Version: This guide assumes you're using Sylius 2.x with Symfony Flex. If you're using a legacy setup without Symfony Flex, refer to the legacy installation instructions instead.

1. Prepare Your Environment

Before installing the plugin, ensure that your project:

  • Uses Symfony Flex

  • Runs a supported Sylius 2.x version

  • Has yarn and Symfony Encore correctly configured

2. Allow Symfony Contrib Recipes

To allow Symfony to install community recipes (like the CMS plugin):

composer config extra.symfony.allow-contrib true

If prompted during plugin installation, accept the community recipe when asked.


3. Install the Plugin via Composer

composer require sylius/cms-plugin

This will install the plugin and apply the Flex recipe, which registers required services and configuration.


4. Install Required JavaScript Packages

The CMS plugin uses trix for rich text editing and swiper for image galleries.

Run the following commands:

yarn add trix@^2.0.0 swiper@^11.2.6

Then compile the frontend assets:

yarn encore dev

For production:

yarn encore production

5. Run Doctrine Migrations

The plugin comes with database changes. Run:

bin/console doctrine:migrations:migrate

For production:

bin/console doctrine:migrations:migrate -e prod

6. Clear the Cache

Finally, clear the Symfony cache to ensure changes are applied:

bin/console cache:clear

✅ Installation Complete!

You can now manage CMS content through the Sylius Admin Panel under the new "CMS" section.

For further customization or integration into your storefront, refer to the official plugin documentation or reach out via the Sylius Community channels.

Last updated

Was this helpful?