- English
- français
- Deutsche
- Contact us
- Docs
- Login

This blog post is based on Florent Huck, Developer Advocate at Upsun, at SymfonyCon 2023. We utilized AI tools for transcription and to enhance the structure and clarity of the content.
The journey from a single monolithic application to a multi-application architecture doesn't have to be daunting. At a recent developer conference, Florent from Upsun's Developer Relations team shared a practical step-by-step guide on how to refactor a monolith into multiple applications using Upsun.
According to Upsun’s data, an overwhelming 90% of Symfony applications hosted on their platform are monoliths, with only 10% using two or more applications. This statistic reveals a significant opportunity for developers to modernize their architecture and decouple their applications for better scalability and maintainability.
The example project is the “Bigfoot” workshop site. It started as a Symfony 6.2 application on PHP 8.3 with PostgreSQL 15 and no admin interface. For the workshop, the team needed the same site in other languages and a simple way to manage content. That pushed the move from one app to a multi-app setup:
Upsun sits between your code and a major cloud provider you choose. You do not manage servers. You push your code, set a simple YAML config, and Upsun handles hosting. A new project gets the default architecture out of the box: CDN, automatic backups, caches, search, and a database. Even the demo app includes PostgreSQL without requiring any additional steps. Certificates are managed for you with automatic renewals, so you don't have to worry about TLS certificate management.
If you want a quick look at how Upsun works, start here on the Upsun website.
Four commands to live
The deployment process is straightforward. With just four commands using the Symfony CLI, you can have your application up and running:
From there, every Git branch gets its own live environment with a stable URL and a valid certificate. You test in an environment that behaves like a production environment. Thanks to Fabien Potencier's work integrating Upsun CLI tools into the Symfony CLI, everything can be managed through a single interface.
To demonstrate the refactoring process, Florent used a real example: the Bigfoot website, originally created for Blackfire workshops. This blog-like site about Bigfoot sightings was built as a monolith using:
The goal was to transform this single application into multiple interconnected applications:
Never push directly to production. Start by creating a new branch using the Symfony CLI, which automatically creates both a local Git branch and a corresponding environment with the same data as your previous branch.
Upsun automatically generates SSL certificates and manages their renewal, eliminating the pain point that many developers face when managing certificates manually.
The transformation requires reorganizing your folder structure. Instead of having a single application with a .upsun configuration folder, you create:
.upsun folder containing the main configurationInstall the API Platform core bundle in the Symfony app. It exposes a REST API from your Doctrine entities. When an entity changes, the REST endpoints reflect that change. That is how the Gatsby front end and the admin will read and write content.
Upsun uses a single YAML configuration file. This file contains three main sections:
Routes configuration: Each application gets its own routing block. You define URL patterns, such as using the default domain for the main app, /admin for the administration interface, /site for the Gatsby frontend, and subdomains for services like Mercure.
Services configuration: Adding services is straightforward. Under services, define the data stores each app needs:
type: postgresql with version: 15 for the database.For example, to add Redis, you simply specify:
redis:
type: redis
version: 7You can add small config flags here (such as max memory policy). Upsun transforms this simple block into the right managed service on the cloud you've chosen. You do not write provider-specific setup scripts.
Application configuration: For each application, you define:
public/index.php).symfony build and symfony deploy to clear cache, run migrations, and run any custom commands you need. Add cron jobs and workers if needed.When your config and code changes are ready:
symfony push deploys your branch environment./admin./site.Test each route. When you are satisfied, run symfony merge. Upsun promotes the build-to-production.
Upsun introduces a resource:set CLI command that allows per-container resource allocation. You can specify exactly how much CPU and RAM each container receives, making the platform more flexible and cost-effective.
This granular control means you can:
Upsun supports integration with GitHub, GitLab, and Bitbucket. When you create a new branch and push it to your repository, Upsun automatically deploys your source code to a dedicated environment, enabling proper continuous integration.
However, developers must be mindful of resource usage since each environment contributes to the monthly bill. Unlike fixed-size preview environments, Upsun's flexible model means your feature branches can impact costs if not adequately managed.
Upsun's motto is "Deploy Friday" (and even "Deploy on Black Friday"). The philosophy is simple: if you can test your features in a production-like environment, you can confidently push all necessary source code to your Git branch.
This approach eliminates the common developer nightmare: "I don't understand why staging crashed; it works locally." With proper environment parity, missing files will cause failures in your development environment before reaching production.
The multi-application architecture requires slight modifications to your Git workflow, but the core process remains familiar. The key is to deploy frequently and test thoroughly in environment branches before merging to production.
During the development of the multi-application Bigfoot site, several challenges emerged:
.environment file solution offers the flexibility required for various deployment scenarios.This approach to refactoring opens up numerous possibilities for modern web development. By decoupling your monolith into specialized applications, you gain:
The Bigfoot project successfully demonstrated how a traditional Symfony monolith can evolve into a modern, multi-application architecture while maintaining all functionality and adding new capabilities, such as real-time communication and advanced administration interfaces.
You do not have to jump into a microservices maze. You can split a monolith into several apps where it makes sense, such as API, admin, frontend, and real-time. Upsun’s single YAML, managed services, auto HTTPS, and branch environments make that move safe and repeatable. When you are ready, merge and go live.
Join our monthly newsletter
Compliant and validated