Table of Contents
What you will read?
Symfony is a modern PHP framework designed for building robust, scalable, and high-performance web applications. It powers many enterprise-level systems and is loved by developers for its flexibility and developer-friendly structure.
If you’re running Ubuntu 25.10, you can easily install Symfony and start building powerful applications in minutes.
Update the System
Before installing anything, make sure your system packages are updated:
sudo apt update && sudo apt upgrade -y
Install PHP and Required Extensions
Symfony requires PHP 8.2 or later (Ubuntu 25.10 comes with newer versions by default). Install PHP along with the necessary extensions:
sudo apt install php php-cli php-common php-mbstring php-xml php-zip php-curl php-intl php-sqlite3 unzip git -y
Verify that PHP is installed:
php -v
You should see something like:PHP 8.2.x (cli) (built: ...)
Install Composer
Symfony uses Composer (PHP’s dependency manager) to install and manage packages.
Install Composer globally with the following commands:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
sudo mv composer.phar /usr/local/bin/composer
php -r "unlink('composer-setup.php');"
Check that Composer works:
composer --version
Install Symfony CLI
Symfony provides an official CLI tool that simplifies creating, running, and managing projects.
Download and install it using the command below:
wget https://get.symfony.com/cli/installer -O - | bash
Move the binary to a global location:
sudo mv ~/.symfony*/bin/symfony /usr/local/bin/symfony
Confirm the installation:
symfony -v
Create a New Symfony Project
Now you can create a new Symfony project using the CLI:
symfony new my_project --webapp
This will install a fully functional Symfony web application with all the common dependencies (Twig, Doctrine, etc.).
Move into your project directory:
cd my_project
Run the Symfony Local Web Server
Symfony CLI comes with a built-in local web server. You can launch your app immediately:
symfony serve
If everything is installed correctly, you’ll see output like:
[OK] Web server listening on https://127.0.0.1:8000
Now open your browser and go to:
👉 https://127.0.0.1:8000
You should see the default Symfony welcome page.
Configure Permissions (Optional)
If you face any permission issues, especially when working with cache or logs, run:
sudo chown -R $USER:$USER /var/www/html/my_project
Deploying Symfony (Optional)
When moving your project to production, you can configure Apache or Nginx.
For Apache:
sudo apt install apache2 libapache2-mod-php -y
sudo systemctl enable apache2
sudo systemctl start apache2
Place your Symfony project in /var/www/html/ and configure a virtual host if needed.
Installing Symfony on Ubuntu 25.10 gives you access to a world-class PHP framework that’s perfect for developing fast, reliable, and scalable web applications. Whether for enterprise software or small web apps, Symfony provides the tools and structure to make your development smooth and efficient.
For fast Ubuntu VPS servers optimized for PHP frameworks like Symfony and Laravel, visit Dropvps — high-performance hosting for developers and production workloads.
