Vigyata.AI
Is this your channel?

Episode 6 - Laravel Deploys Made Safe - Staging First Workflow

299 views· 13 likes· 10:07· Jun 4, 2025

🛍️ Products Mentioned (4)

In this video, I’ll show you how I safely test new features by deploying them to a staging environment first, using Cloudways. Once everything works as expected, I push those changes to the production server — no surprises. === OFFER === GET 15% DISCOUNT ON ALL PLANS OF CLOUDWAYS HOSTING FOR 3 MONTHS https://unified.cloudways.com/signup?id=1029148&coupon=LARATIPS&data1=LARA7&utm_content=LARA7&utm_source=YouTube === Important Links === Fonts, extensions I use, and Support Laratips links: https://bit.ly/3YWsCi3 === Video Related Links === 👉 Project GitHub Link https://github.com/AshishDhamalaAD/todoapp 👉 Watch the full playlist: Not Just Another Todo App https://www.youtube.com/playlist?list=PL2DahmvUpeutVEyDcVzAMVH7NLSNy6lrS 👉 @class blade directive on Laravel Documentation https://laravel.com/docs/12.x/blade#conditional-classes #laravel #php #laraveltip #laratips

About This Video

In this episode, I show you the exact workflow I use to make Laravel deploys safe: staging first, production second. I start inside Cloudways by cloning my existing production app to create a separate staging application. Cloudways gives me a new URL plus separate database credentials, and then I jump into the server to update the staging .env (APP_NAME, APP_ENV=staging, APP_URL, and keeping debug on while I’m testing). The big win here is that the cloned app is basically “full-blown” and ready in minutes, including the database. After that, I set up Git-based deployments for staging properly: generate a new SSH key for the staging app, add it to GitHub deploy keys, and deploy only a dedicated staging branch (main is for production only). I also copy over cron jobs, set up Supervisor for Horizon, and fix the Horizon 403 by allowing access only for a specific email in the Horizon service provider. Then I test a real UI change on staging (conditional row classes using Laravel’s @class directive), confirm everything works, and only then merge staging → main and deploy to production. Finally, I lock down production basics like APP_DEBUG=false and run composer install --no-dev to avoid the security mistakes I made as a beginner.

Frequently Asked Questions

🎬 More from Laratips