๐——๐—ฒ๐—ฝ๐—น๐—ผ๐˜†๐—ถ๐—ป๐—ด ๐—ฆ๐˜†๐—บ๐—ณ๐—ผ๐—ป๐˜† ๐Ÿด ๐˜๐—ผ ๐—ฐ๐—ฃ๐—ฎ๐—ป๐—ฒ๐—น

Many guides assume you have SSH access. Shared hosting often lacks it. You need a different way to deploy.

Here is your step by step guide.

Check your assets first. Use asset('images/') instead of asset('/images/'). This stops loading errors in production.

Set up environment variables. Register DotenvDumpCommand in services.yaml. Run the dotenv:dump command. This creates .env.local.php. It makes your app faster.

Prepare your vendors and cache.

Fix Apache routing.

Update your folder structure.

Build your assets.

Update Kernel.php.

Upload your files. Zip these items:

Do not upload these:

Upload the zip to cPanel. Your app is live.

Source: https://dev.to/ashrafchitambaa/deploying-symfony-8-to-cpanel-step-by-step-guide-4k5o