symfony 4 start code example

Example 1: symfony start server command

$ cd my-project/

# start the server in the background
$ symfony serve -d

# continue working and running other commands...

# show the latest log messages
$ symfony server:log

# stop the server
symfony server:stop

Example 2: create symfony 4 project

$ composer create-project symfony/website-skeleton:"^4.4" my_project_name

Example 3: symfony install website skeleton

# run this if you are building a traditional web application
 composer create-project symfony/website-skeleton my_project_name

Example 4: symfony new project

# use the most recent LTS version
$ symfony new my_project_name --version=lts

# use the 'next' Symfony version to be released (still in development)
$ symfony new my_project_name --version=next

# you can also select an exact specific Symfony version
$ symfony new my_project_name --version=4.4

# The --full option installs all the packages that you usually need to build web applications.