ddev-sylius: A DDEV Boilerplate for Sylius 2.x
ddev,sylius,symfony,open-source,e-commerceThe project started during a remote Sylius setup — configured entirely over SSH from a phone. The process was repetitive enough to warrant automating, so I put together a DDEV boilerplate. It got shared publicly before I considered it finished, so I released it as an early alpha and iterated from there.
After a year of internal use it reached v1.0.0, with full Sylius 2.x support, a clean structure, and everything I use day-to-day. Version 1.0.1 followed the next day with cross-platform fixes.
Why Sylius setup is painful without tooling
Sylius 2.x has a non-trivial local setup. It requires PHP 8.4, Composer, a database, a web server with the correct rewrite rules, Node.js and Yarn for compiling the admin assets (based on Webpack Encore), and the Symfony binary for console tasks. Getting all of those running consistently across developer machines — Windows, macOS, Linux — without a container setup is fragile. Versions drift, environment variables differ, paths conflict.
DDEV solves this by declaring the entire environment as configuration. The boilerplate bakes in the correct versions and wires them together so no one has to figure it out manually.
What it configures
The .ddev/config.yaml sets:
- PHP 8.4 with
apache-fpm(Sylius 2.x requires PHP 8.2+; 8.4 is current stable) - MariaDB 11.8 — latest stable, with
upload_dirstuned to excludemedia/,node_modules/, andbackups/from Mutagen sync on macOS - Composer 2
- Ports 8123 (HTTP) and 8443 (HTTPS) to avoid conflicts with other local projects
- Xdebug disabled by default — enable with
ddev xdebug onwhen needed
What's included
ddev-sylius is a DDEV-based project template for Sylius 2.x. Clone it, run two commands, and you have a working local Sylius instance — no manual configuration of PHP versions, database, or web server.
Custom DDEV commands bundled with the boilerplate:
ddev sylius-install— full Sylius installation from scratchddev cc— clear cachesddev dist— install dependencies and build assets (Composer + Yarn)ddev yarn <param>— Yarn commands inside the containerddev security-checker— scan for known vulnerabilitiesddev code-check— run coding standards validationddev backup/ddev database-import/ddev files-import— backup and restore database and mediaddev sylius-cleanup— reset all data (useful when re-testing install flows)ddev build-site/ddev rebuild-site— full or partial project rebuild
Tested on Windows 11 with WSL2 (Ubuntu 24.04), macOS Tahoe (Apple Silicon), and Linux with Docker.
Getting started
git clone https://github.com/holas1337/ddev-sylius my-project
cd my-project
ddev start
ddev sylius-install
That's it. A few minutes later you have a running Sylius storefront with an admin panel, accessible at the DDEV-generated local URL (default https://ddev-sylius-boilerplate.ddev.site:8443).
Day-to-day workflow
After the initial install, the typical daily commands are:
ddev start # start the environment
ddev cc # clear caches after config changes
ddev dist # rebuild assets after frontend changes
ddev code-check # check coding standards before committing
ddev backup # snapshot database before a risky migration
For debugging, ddev xdebug on enables Xdebug, and ddev exec bin/console <command> gives direct access to the Symfony console inside the container.
What changed in 1.0.1
The day-after release fixed things that showed up during cross-platform testing: macOS-specific adjustments for Mutagen and upload directory exclusions, MariaDB upgraded from 11.4 to 11.8, and phpMyAdmin updated to the latest version.
The repository is on GitHub: holas1337/ddev-sylius. Issues and PRs welcome.