Symfony is a popular PHP framework that powers a number of applications across the internet. The best feature of Symfony is the Symfony Components that are used to create the basis for powerful CMS such as Drupal.
Symfony has over 2000 contributors that contribute code to the core and various components of the framework. In addition, the Symfony community numbers 300,000. The average monthly downloads for the framework are about 29,000,000.
Such an excellent framework needs a reliable and fast server infrastructure for optimum performance. DigitalOcean is one of the most popular server infrastructure provider with a reputation of being cost effective, dependable and scalable. DigitalOcean has become the first choice of developers globally because of the number of global locations.
To avoid the difficult process of hosting your Symfony application directly on DigitalOcean, you should opt for Cloudways, a managed cloud hosting platform that offer optimized PHP stack for your PHP app.
Following is the process of hosting Symfony on DigitalOcean.
Signup For Free
Click on the “START FREE” button to initiate the signup process. Enter a valid email address to signup at the Platform. Remember that you can also sign up using your LinkedIn, Google or Github account.
Select Your Application
Select PHP Stack from the drop-down menu and give it a name. Give a name to the server and project folder too.
Choose the Cloud Infrastructure
Choose a Cloud Infrastructure from the list of market leading providers.
Configure Your Server
Select your server space. Remember that your server should have enough space for handling unforeseen situations.
Select Server Location
Choose the server location wisely. Your server should be located near to your target audience in order to offer better load time.
Your server is now ready. Click the LAUNCH SERVER button. Just wait for a few minutes and start using your optimized PHP application.
Launch SSH Terminal
Move on to the “Server Management tab” to launch “SSH Terminal”, located in the “Master Credentials”. Here you can find your login credentials for the SSH terminal.
Login to SSH with these Master Credentials.
Empty your public_html directory
Empty your public_html directory by deleting all files in it. To remove all files, move to your public_html folder and delete all files using rm -Rf * command.
Install Symfony 3
Make sure that you are in public_html folder, run this command to install the latest version of Symfony.
composer create-project symfony/framework-standard-edition your_project_name "3.0.*"
For 3.1 and higher version replace the version number with x:
composer create-project symfony/framework-standard-edition your_project_name "3.x.*"
Add Database Information
As Symfony starts downloading, it will ask you for your database information.
You can find your database information under the “Application Management”. Go to the “Access Detail” tab and see MySQL Access.
After providing your database information, the Symfony installation process will be over.
You are done!
Go to “Access Detail” in the “Application Management tab” and copy your application’s URL.
Open any web browser and access the welcome page of Symfony by entering
This is it, the latest version of Symfony is now active on DigitalOcean server.
If you still have any confusion about this setup process, feel free to comment below.
Cloudways offers various distinctive features including free 3-day trial, CloudwaysBot, Cloudways API, free SSL certificates by Let’s Encrypt, free WordPress migration, 24x7x365 live human interactive support, and much more.
To know more about Cloudways, sign up to experience one of the best managed cloud hosting platforms.