Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

peterlc's avatar

Deploy without surprizes

I know the "Laravel way" is to run all artisan/composer stuff upon deploy.

I have matched my dev env almost identical to the production server and would like to run every production preparing stuff and test site locally and then upload also the updated vendor folder.

Is this totally stupid and if so why?

0 likes
3 replies
peterlc's avatar

I don't have shared hosting, i have a DigitalOcean VPS with public as my web root like i should be.

My provider Cloudways allows for "deploy with git" both with pull on klick and webhook upon push to repo. What they don't have (yet) is the ability to run artisan/composer stuff unless you code it your self in the gitautodeploy.php file.

This brings me to the thought of maybe doing everything ready locally and then push all stuff to git, i will do npm run -production to prepare all my Vue js stuff and i also want to see that these work not just in dev mode.

I don't need/want the whole versions/symlinks stuff. If for some reason my prod site brakes on git pull/push even though i have tested the exact content locally i can alway revert to latest backup in a heart beat.

Make sense @jlrdw ?

jlrdw's avatar
jlrdw
Best Answer
Level 75

Pushing your files over does make sense and sounds like you are smart enough to have good backups so many people don't.

2 likes

Please or to participate in this conversation.