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

Mithridates's avatar

Deploy site

I see there is a package https://github.com/deployphp/deployer called deployer. which is used to deploy php apps. Laravel is supported out of the box.
Has any one used this package so he can help me abit?
And if not so how do you deploy your app to vps?
I'm now using filezilla to upload but is really sucks.

0 likes
6 replies
Mithridates's avatar

@bobbybouwmann What I was asking was that if any one prior to me, had tested this package and it worked for them.
Right now I'm not sure what are the alternatives to fileZilla, so I asked if there was a better soloution as well.

bobbybouwmann's avatar

I guess host users use git (github, gitlab, bitbucket) and simply pull the code on the server. Then they run composer update and their migrations and everything else that is needed.

To automate this you can use https://forge.laravel.com An excellent tool created by Taylor himself ;)

Mithridates's avatar

@bobbybouwmann Actually Although I use git locally. but the code is not on a repo(github,etc).
Also I don't plan to use paid tools like envoyer,forge yet.
With all that said, what you suggest me to push my code to the vps, And if possible automate these stuff?
Cheers :)

bobbybouwmann's avatar

You can create your own script for that. I wouldn't know a free one out of my head.

If you ssh into your vps you can run git pull, composer and your migrations.

Erulezz's avatar

If you already have everything locally in a git repo you can do this;

Create a empty repo outside your docroot on your vps;

-> mkdir repo.git && cd repo.git

-> git init --bare

-> cd hooks

-> nano post-receive

Add this;

#!/bin/sh
git —work-tree=/home/user/public_html/ —git-dir=/home/user/repositories/repo.git checkout -f

-> chmod +x post-receive

Add this repo in your local one;

-> git remote add origin ssh://user@ip-or-domain/home/user/repositories/repo.git

Then push everything.

1 like

Please or to participate in this conversation.