A Symfony production deployment needs the correct dependencies, environment and public document root. Uploading a development directory without preparing its cache can leave debugging enabled or load the wrong services.
IN THIS ARTICLE
Check access and requirements
Confirm the PHP requirements of the selected Symfony branch, required extensions and database connectivity. Prepare a tested release and an authorised way to run its console commands.
01 Deploy Symfony in the production environment
Upload the reviewed application and committed Composer lock file to a release directory. Install production dependencies with the selected PHP runtime and omit development packages unless a justified build step needs them.
Configure the production environment with debug disabled. Most applications use
APP_ENV=prodandAPP_DEBUG=0; check any custom runtime bootstrap as well.Point the domain to the
publicdirectory. Keep configuration, source code, logs and dependency metadata outside direct web access.Clear and warm the production cache using the application console as the intended deployment account. Apply approved migrations separately and build the assets used by this application.
Restart persistent message consumers after the release changes and confirm the supervisor launches them from the new path.
Confirm the expected result
Check a public page, an authenticated request, an asset and a database write. Inspect the private log and verify that debug pages or the development profiler are not publicly exposed.
Resolve setup problems
A cache warmup failure can indicate a missing extension, unresolved environment value or incompatible service definition. Correct the reported cause before switching the active release.
A common question
Can I upload my local cache directory to production?
Build the appropriate cache for the target environment through the supported release process. Local cached paths and development configuration are not a reliable substitute for production preparation.