The Sylius main application can serve as an end-user app, as well as a foundation for your custom e-commerce application.
If you downloaded the Composer phar archive, you should use
php composer.phar where this guide uses
If you prefer to work with Vagrant head to this guide.
Initiating A New Sylius Project¶
To create a new project using Sylius Standard Edition, run this command:
$ composer create-project -s beta sylius/sylius-standard acme
This will create a new Symfony project in
acme directory. When all the
dependencies are installed, you’ll be asked to fill the
file via interactive script. Please follow the steps. After everything is in
place, run the following commands:
$ cd acme # Move to the newly created directory $ php bin/console sylius:install
This package has the whole
sylius/sylius package in vendors, so you can easily update it and focus on your custom development.
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 later on changed in the
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.
In order to see a fully functional frontend you will need to install its assets.
Having Yarn installed go to your project directory and run:
$ yarn install
And now you can use gulp for installing views, by just running a simple command:
$ yarn run gulp
Although if you have Gulp installed globally then run just:
Accessing the Shop¶
We strongly recommend using the Symfony built-in web server by running the
php bin/console server:start 127.0.0.1:8000
command and then accessing
http://127.0.0.1:8000 in your web browser to see the shop.
The localhost’s 8000 port may be already occupied by some other process.
If so you should try other ports, like for instance:
php bin/console server:start 127.0.0.1:8081
Want to know more about using a built-in server, see here.
You can log in as an administrator, with the credentials you have provided during the installation process. Since now you can play with your clean Sylius installation.
Accessing the Administration Panel¶
Have a look at the
/admin url, where you will find the administration panel.
Remember that you have to be logged in as an administrator using the credentials provided while installing Sylius.
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:
app/config/- here you will be adding the yaml configuration files including routing, security, state machines configurations etc.
var/logs/- 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
web/- there you will be placing assets of your project