Deploy PHP website using Git?

I’m wondering if Linode can support the setup I’m currently using at another host, so I can rewrite as little as possible if I port the site to Linode? The site is kind of in maintenance mode, and I’m not looking to do a big stack rewrite if I can help it.

The site is a pretty basic PHP site with no database; just using PHP to dynamically generate a couple of things.

Currently, I deploy the site via a custom Git setup. The way it works is:

  1. Push to Git on BitBucket.
  2. BitBucket repo runs a webhook that hits a PHP script on my web server.
  3. PHP script runs a script on the web server that does a Git pull to sync up the files with the new state of the repo.

I’d be up for adjusting the part where PHP triggers Git on the server, if there’s something more out-of-the-box I could use. But I’m curious what parts of Linode I should look at to figure out if it will meet my needs.

3 Replies

🤔 I'm starting to think I may just bite the bullet and set up Docker for this project. How hard could it be? 🙃

I was posting this because the original host of the site took it down without warning due to a technical glitch, and has been uncommunicative about their status. However, the site came back up eventually due to some (presumed) work on their part and some work on mine. And the lack of answers here doesn’t bode well for the kind of support I think I would need. So it’s back to the original host for now.

Glad to hear your site came back up eventually, however, it doesn't seem like your current host provider kept you in the loop which can be pretty frustrating.

It's important to note that this is the Linode Community site and not where customers come to open tickets. This is the place folks come to ask questions about configuration issues and developer resources which differs from tickets sent to our Support Team. However, you can always call into our Support Line for general questions - someone is there 24/7 to help you out:

U.S. 855-454-6633
Global +1-609-380-7100

When it comes to your question, I'll admit I'm not a Git expert and I've never used BitBucket so I'm not 100% sure on the configurations for those two services. For the web server and PHP however, you can go ahead and deploy a LAMP or LEMP stack from the Linode Marketplace which will install Apache or Nginx and PHP on your compute instance. Once it's up and running, you'll need to transfer the files from your previous host to your Linode. This guide titled Migrate to Linode should help you out.

Once that's done, you'll need to edit your BitBucket webhook so that it hits the PHP script on your newly configured Linode.

If you have a custom domain name, you may also want to consider adding Linode name servers as the authoritative name servers for easier DNS configuration. This way you will be able to create DNS records through the Cloud Manager.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct