To create your new Symfony application, first make sure you're using PHP 7.1 or higher
and have Composer installed. If you don't, start by installing Composer globally
on your system. If you want to use a virtual machine (VM), check out Homestead.

Create your new project by running:

1

$ composer create-project symfony/website-skeleton my-project

This will create a new my-project directory, download some dependencies into
it and even generate the basic directories and files you'll need to get started.
In other words, your new app is ready!

Tip

The website-skeleton is optimized for traditional web applications. If
you are building microservices, console applications or APIs, consider
using the much simpler skeleton project:

Open your browser and navigate to http://localhost:8000/. If everything is working,
you'll see a welcome page. Later, when you are finished working, stop the server
by pressing Ctrl+C from your terminal.

Tip

If you're having any problems running Symfony, your system may be missing
some technical requirements. Use the Symfony Requirements Checker
tool to make sure your system is set up.

Tip

If you're using a VM, you may need to tell the server to bind to all IP addresses:

1

$ php bin/console server:start 0.0.0.0:8000

You should NEVER listen to all interfaces on a computer that is
directly accessible from the Internet.

If you're working on an existing Symfony application, you only need to get the
project code and install the dependencies with Composer. Assuming your team uses Git,
setup your project with the following commands:

You'll probably also need to customize your .env and do a
few other project-specific tasks (e.g. creating database schema). When working
on a existing Symfony app for the first time, it may be useful to run this
command which displays information about the app:

Symfony provides a utility called the "Security Checker" to check whether your
project's dependencies contain any known security vulnerability. Check out
the integration instructions for the Security Checker to set it up.

The Symfony Demo Application is a fully-functional application that shows the
recommended way to develop Symfony applications. It's a great learning tool for
Symfony newcomers and its code contains tons of comments and helpful notes.