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

jimmyhowedotcom's avatar

Simple GitHub Deploy Strategy

Up until a while ago I was using FTP to upload my site, but more recently I've been uploading my project to GitHub then SSH'ing into my Server (hosted by HostPresto)...

What I want is to push to GitHub and have that then update on my server. I've been reading up on different methods but to be honest I'm still pretty lost as to how to do it?

What is a simple way to achieve this?

0 likes
3 replies
ZetecVan's avatar

If you use Forge you can set it up to automatically update when you push to GitHub. I only have my staging server set up like that. I manually deploy to production.

dmcglone's avatar

After you push to github, ssh into your server and set up git on your server and pull the project from github to the server.

If your looking for an automatic way to pull to your server from github, you could always set up a cron job.

andy's avatar

I've used git hooks before to do this. You setup the hook to listen for changes on your github repo and the hooks will automatically pull for you.

I stopped doing this since I needed to learn how to use git better.

1 like

Please or to participate in this conversation.