Continuing its emphasis on diversity, Symfony has recently published a major release which greatly improved the entire concept of standard Symfony application. This release provides a simple directory structure with less dependencies resulting in fast application development. The new release gives the feel of Silex in its structure.
The good news is that Flex is now included as a dependency in the new version. You can easily create a new Symfony 4 skeleton projects with Flex enabled. I’ve already discussed the directory structure and Flex.
Note: If you are running older versions and wish to upgrade to Symfony 4, follow the official upgrade guide
Let’s get started
Install Symfony 4 on Cloud
In my opinion, the best option for installing Symfony 4 on different cloud infrastructure providers including DigitalOcean, Linode, Vultr, AWS, Cloudways offers the best managed experience. To begin, you should sign up for a Cloudways account and then follow these steps that setup a Symfony 4 app on cloud:
- From the Application dropdown on your Cloudways dashboard, choose PHP Stack Custom from the list of available applications.
- Name your application and the server and select the project from the drop-down menu.
- Select the cloud provider from the list of available infrastructure providers.
- Select your desired server size .
- Select server bandwidth and storage size.
- Select the server location. This choice affects server latency so choose the location closest to your target audience in order to provide the best experience to the visitors.
- Click the Launch Server button to complete the setup.
You can follow the GIF to launch the server on Cloudways
PHP 7.1 is a mandatory requirement Symfony 4, and (if needed) you need to update the PHP version from Settings & Packages tab.
Now that the server is ready, move to Server Settings > Open SSH Terminal > move to the PHP app and run the following command to install Symfony 4:
composer create-project symfony/skeleton symfony4
This command will install the Flex enabled Symfony 4 application.
Now move to Application Access Detail page and open the app URL in a new browser tab. You will see the new Symfony 4 Welcome Page.
Yes, it is this easy to install Symfony 4 on a cloud provider using managed Cloudways servers.
Start Creating Web Apps on Managed Cloud Servers Now!
Easy Web App Deployment for Agencies, Developers and E-Commerce Industry