This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

🔊 Web Growth Summit is here! Learn from industry experts on July 17-18, 2024. REGISTER NOW→

How to Host Symfony on AWS EC2 (Amazon Cloud)

Updated on March 9, 2023

5 Min Read

Symfony is a developer-centric PHP framework that powers thousands of websites and web apps today. This framework is built upon Symfony Components that developers mix-and-match to create CMS and platforms such as Drupal, eZ Publish, etc.

The framework is particularly well known for its vibrant community that includes over 2,000 contributors who maintain the Symfony core code and related projects.

Reference: Builtwith, Feburary 2023

Such a robust framework needs to be paired with an excellent hosting solution. This is where AWS hosting services excels because it is considered the pioneer in providing cloud infrastructure with persistent performance, reliable server infrastructure, and prompt technical support.

Amazon has data centres at major business locations. As a result, you get the option to host your websites closer to the target audience. Hosting Symfony on an AWS EC2 is not at all difficult. In this tutorial, I’ll show you that you can install Symfony on AWS using Cloudways Platform within minutes.

Why Choose Amazon Cloud?

In addition to the user-friendly UI, the fully managed Platform offers several exciting features, including a free SSL certificate by Let’s Encrypt, an optimized PHP stack, CloudwaysBot for prompt notifications, vertical scaling, and top notch technical support.

Why is AWS the ideal platform for Your Startup?

Find out why AWS is the perfect platform for your startup and how it can help you achieve your business goals.

To help you make an informed decision, Cloudways offers a free 3-day trial. There is also the flexibility of apps, as you can launch Magento, PHP, Laravel  on EC2 servers through the CloudWays platform.

If you still have any confusion about installing Symfony on AWS, feel free to comment below, and I’ll answer them for you.

To launch a Symfony on AWS EC2 server on Cloudways, follow these steps:

Install Symfony 6.x On AWS EC2

Enter a valid email address to sign up at the Platform.

Cloudways sign up screen

Note: You can also sign up using your LinkedIn, Google, or Github account.

Enter the details and click “START FREE” to initiate the process.

For this tutorial, I will install the latest version of the Symfony framework over the PHP application on AWS EC2.

Symfony Hosting Made Simple

Experience fast performance with 24/7/356 support.

Select PHP Application

  • Select Custom PHP Application from the drop-down menu,
  • Enter a name for the application,
  • The select the server of your choosing, and select the project.

Choose the Cloud Infrastructure – AWS EC2

  • You can choose from the top five amazing cloud server providers. I am going to opt for AWS infrastructure

AWS Server

Configure Your Server

  • Select server size, bandwidth, and storage space.

When your requirements increase, you can always scale server configuration through the Vertical Scaling function.

Note: Remember that your server should have enough storage, RAM, and bandwidth to handle traffic spikes and for uncertain situations.

storage, database and location

  • Click LAUNCH SERVER and wait for a few minutes for the optimized PHP application to be deployed on the AWS Server.

AWS Server

Launch SSH Terminal

  • Click on “Server Management” tab to launch the SSH Terminal.
  • Here you can find the login credentials for the SSH terminal to access your server.

Install Symfony on Cloudways

In the SSH Terminal, move to the public_html folder.
Note: As a precautionary measure, delete all the existing files and folders inside the public_html folder through the following command:

rm -Rf *

Update Your PHP Version on Cloudways

  • Click Settings & Packages > Packages.

  • Before you move forward with the installation, you must ensure your server is compatible to symfony 6 requirement.

  • You will see your current PHP version; click the edit button right next to it.
  • Select PHP 8.1 from the drop-down menu.

 

  • Click on save button.

You will have your PHP version updated to 8.1, and completed all server requirements to deploy symfony, lets continue with the installation.

Now, use the following command to install Symfony 6.1.12

  • composer create-project symfony/website-skeleton symfony-cloudways
  • Replace symfony-cloudways with the desired project name. I am going to use myproject as the project name.

 

  • Do you want to include Docker configuration for this project?
  • Enter n (NO)

Ready to Go!

Once the installation finishes, go to “Access Detail” in the “Application Management” tab and visit the application’s URL

http://your_application_url/symfony-cloudways/public

This is it. The latest version of Symfony is ready to use.

Note: You no longer need to configure the database during the installation process. as required for the earlier versions.

Symfony Hosting Made Simple

Experience fast performance with 24/7/356 support.

Pricing Plan

Cloudways offer Pay-as-You-Go service; this means you only pay for the resources you consume. With Amazon (AWS), Disk Sizes are configurable, and Bandwidth is on pay as you go basis.

Summary

AWS with Cloudways is a great option for those who are less teck savvy or who want to get strong and optimized performance on a budget.

Here in this article, we’ve launched a managed AWS server with Symfony. You can now explore the amazing Cloudways Platform optimized with its custom ThunderStack.

You can now focus on managing your AWS-based Symfony website and let Cloudways-managed Symfony hosting handle your server management hassles.

Q: What is Symfony used for?

A: Symfony is a PHP based modern framework famous for creating secure websites and web applications with the help of its different components.

Q: Is Symfony still used?

A: with around 110,850 websites live on the internet, Symfony can be considered one of the leading PHP frameworks.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Shahzeb Ahmed

Shahzeb is a Digital Marketer with a Software Engineering background, works as a Community Manager — PHP Community at Cloudways. He is growth ambitious and aims to learn & share information about PHP & Laravel Development through practice and experimentation. He loves to travel and explore new ideas whenever he finds time. Get in touch with him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now