HostRight

Application hosting

Deploy Symfony with Composer, MariaDB, Redis, and Cron Jobs

Bring a Symfony application to HostRight with PHP version selection, Composer, a private project root, MariaDB, Redis, SSL, and scheduled console commands.

Symfony applications can run on HostRight when the public document root points to public/ and the application has the PHP extensions, Composer dependencies, database, and environment variables it needs.

Deploy the application

Keep the project private and set the domain document root to its public directory:

apps/example-symfony/
├── config/
├── public/
├── src/
├── var/
├── vendor/
├── composer.json
└── .env.local

Deploy with Git or SFTP and install production dependencies:

cd ~/apps/example-symfony
composer install --no-dev --classmap-authoritative
php bin/console cache:clear --env=prod

Configure PHP and services

Select a compatible PHP version in Extra Features → Select PHP version and enable the extensions required by your Symfony version and bundles. Configure the database URL and application secrets outside the public directory.

Create a MariaDB database in Account Manager → Databases, then set the exact connection details in DATABASE_URL. Enable Redis when the application uses cache, sessions, Messenger, or rate limiting. See database management and Redis setup.

Run database migrations only after taking a backup:

php bin/console doctrine:migrations:migrate --no-interaction

Schedule Symfony commands

Use Cron Jobs for recurring Symfony console commands, reports, cleanups, imports, or Messenger maintenance. Use an absolute path and redirect output to a private log file:

cd /home/ACCOUNT_USERNAME/apps/example-symfony && php bin/console app:daily-report --env=prod >> /home/ACCOUNT_USERNAME/logs/symfony-report.log 2>&1

Avoid scheduling the same job more frequently than it can finish. Add locking or an application-level guard for tasks that must never overlap.

Finish the launch

Point DNS to HostRight, enable SSL, test the HTTPS URL, and confirm forms, mail, database queries, cache, console commands, and logs. Keep APP_ENV=prod and disable debug output in production.