Get a free website with any plan

See how
APPLICATIONS

Installing Symfony

Last updated

IN SHORT

To install Symfony on Flashcloud, connect via SSH, create the project outside your public web root using Composer, and set your PHP version to match your release. Point your domain document root strictly at the public subfolder. Configure your production settings in .env.local and clear the cache before going live.

Symfony isn't a one-click install: there's no Softaculous entry for it because Symfony projects are built with Composer, not deployed as a zip of pre-written files like WordPress or Joomla. On Flashcloud's LiteSpeed + cPanel stack, that means SSH in, run Composer, point your domain's document root at Symfony's public/ folder, and set the right PHP version.

This works the same way on shared and WordPress hosting plans, since both run on the same stack underneath.

Before you start: PHP version and SSH

Check which Symfony version you're installing. Symfony 6.4 and 7.x need PHP 8.1 or higher; older Symfony 5.4 LTS apps will run on PHP 7.4 through 8.1. Flashcloud's shared servers default to PHP 8.2, with 7.4 through 8.3 available per domain from the PHP Version tile in the portal. Set the version that matches your Symfony release before you install anything, since switching it mid-project can surface deprecation errors in vendor packages that were fine under the old version.

You'll also need SSH access, since Composer has to run on the server (or you upload the built vendor/ directory afterward, but running Composer server-side is simpler). SSH Access is available in cPanel on Flashcloud shared hosting; connect with your cPanel username and the SSH key or password you've set up. See accessing cPanel if you need the login steps.

Installing Composer if it's not already available

Check whether Composer is already available on your account:

composer --version

If that comes back with "command not found," download it locally into your home directory:

curl -sS https://getcomposer.org/installer | php
php composer.phar --version

From here on, swap composer for php composer.phar in the commands below if you installed it this way.

Creating the Symfony project

SSH into your account and navigate to a directory outside your public web root first. This matters: Symfony's own app/, src/, config/, and vendor/ folders should never be directly web-accessible, only the public/ folder should be. A common layout is to install Symfony in your home directory, then point the domain's document root at the public subfolder.

cd ~
composer create-project symfony/skeleton my-symfony-app
cd my-symfony-app

For a full-stack app with the usual bundles (Twig, forms, security, etc.), use the webapp variant instead:

composer create-project symfony/skeleton:"7.*" my-symfony-app
cd my-symfony-app
composer require webapp

Pointing your domain at the right folder

Symfony's front controller lives in public/index.php. Your domain, subdomain, or addon domain needs its document root set to that public/ folder, not the project root. If this is a new domain or addon domain, set the document root when you create it. If you're retrofitting an existing site and you're not sure how to point it at Symfony's public/ folder, open a support ticket and our team can confirm the setup.

Once the document root is correct, install dependencies for production (skipping dev-only tools):

composer install --no-dev --optimize-autoloader

Environment and permissions

Symfony reads its configuration from a .env file at the project root. Copy the example and set your values:

cp .env .env.local

At minimum, set APP_ENV=prod and APP_SECRET to a random string, plus your database connection string if you're using Doctrine. Create the database and its user in cPanel via Manage My Databases or the Database Wizard, then use those credentials in your connection string.

Symfony's var/cache and var/log directories need to be writable by the web server user. If you hit permission errors on first load, fix ownership from SSH:

chmod -R 775 var/cache var/log

Clearing cache and going live

Before your first real request, warm the production cache so the first visitor doesn't eat the compile cost:

php bin/console cache:clear --env=prod --no-debug

Any time you deploy new code, repeat composer install --no-dev --optimize-autoloader and cache:clear in that order, since a stale cache pointing at old class definitions is the most common cause of a blank white screen after a deploy.

Symfony apps benefit from the same server-level speed stack as anything else on Flashcloud. LiteSpeed serves your static assets (CSS, JS, images under public/) directly without touching PHP, and you can read more about how that layered caching works in how we make your site fast. If your Symfony app is heavy on database reads, pairing it with a caching layer on the application side is worth doing yourself.

If you get a 500 error with no detail

Production mode hides error details by design. To see the real error, temporarily check var/log/prod.log from the File Manager or SSH:

tail -50 var/log/prod.log

Most first-deploy 500 errors trace back to one of three things: PHP version mismatch (check the PHP Version tile), a missing APP_SECRET or database credential in .env.local, or a document root still pointing at the project root instead of public/.

When to open a ticket

If you need the document root changed for an existing domain, if Composer is missing entirely and the manual install above doesn't work on your server, or if you're getting server-level errors that don't show up in Symfony's own logs, open a ticket from Support in the portal. It goes to a real person, and they can check server-side configuration you don't have visibility into over SSH alone.

Common questions

Can I install Symfony using Softaculous?

No, Symfony is not available in Softaculous. Symfony projects build through Composer on the server, not from pre-written file archives like WordPress or Joomla.

Why is my new Symfony site throwing a 500 error?

Check var/log/prod.log via SSH or File Manager to find the specific error. Most first-deploy 500 errors happen because of a PHP version mismatch, missing credentials in .env.local, or a document root pointing to the project root instead of the public folder.

Why am I seeing a blank white screen after deploying updates?

A stale cache pointing at old class definitions is the most common cause. Run composer install with the no-dev and optimize-autoloader flags, followed by the cache clear console command in production.

Which PHP version should I select for Symfony?

Select PHP 8.1 or higher for Symfony 6.4 and 7.x, or PHP 7.4 through 8.1 for Symfony 5.4 LTS. You can set the version per domain from the PHP Version tile in your portal.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.