Kinsta and GitHub: The Complete Guide to Git Workflows and Automated Deployments
Kinsta and GitHub work together more closely than most WordPress hosting setups allow — every Kinsta plan includes SSH access, which means you can connect Git and GitHub directly to your site without needing extra plugins or middleware. This guide covers everything you need to know about using Kinsta and GitHub together: what GitHub actually is, how to connect Git directly to your Kinsta site, and how to build a fully automated GitHub-to-Kinsta deployment pipeline.
Kinsta and GitHub: What Is GitHub, Exactly?
To understand GitHub, you first need to understand two underlying concepts: version control and Git.
What Is Version Control?
Version control is a system for tracking and managing changes to code over time. Instead of one person editing a single “master” copy of a project directly (which is risky on anything beyond a tiny codebase), developers work in isolated copies, make their changes safely, and then merge those changes back in once they’re tested and ready.
Two core concepts make this possible:
- Branching — creating a separate copy of the codebase to work on without affecting the live version
- Merging — combining a finished branch’s changes back into the main codebase
Every change is tracked, which means it can also be reverted if something breaks.
What Is Git?
Git is the specific tool that makes this kind of version control possible. It’s a free, open-source, distributed version control system — meaning every developer has a full copy of the project’s entire history on their own machine, not just a partial snapshot. This makes branching, merging, and offline work fast and reliable. Git has become the dominant version control standard across the software industry.
So What Is GitHub?
GitHub is a cloud-based hosting platform built around Git. It takes the command-line-driven world of Git and wraps it in a web interface that makes version control accessible to people who aren’t comfortable living in a terminal all day.
On GitHub, a project’s codebase lives in a repository (or “repo”). From there, you can:
- Create a commit — essentially a saved snapshot of your changes, with a message describing what changed
- Create a branch — a parallel version of the repo to safely build a feature or fix
- Open a pull request — a formal request to merge your branch’s changes into the main branch, which also gives others a chance to review your code first
- Fork a repo — create your own independent copy of someone else’s project, which you can then modify freely
GitHub is free for public repositories, which is why it’s the default home for most open-source projects — including, notably, parts of the WordPress ecosystem itself. GitHub makes its money from private repository hosting and enterprise-focused team and security tools.
Connecting Kinsta and GitHub Directly via Git and SSH
Kinsta gives every hosting plan SSH access, which means you can connect to your site’s server and run Git commands directly — no extra plugin required.
Before you start, you’ll need two pieces of information from your site’s Info page in the MyKinsta dashboard:
- Your SSH terminal connection command (under SFTP/SSH details)
- Your site’s file path (under Environment details)
Always run Git commands inside your site’s public directory to avoid permissions conflicts with system-owned files elsewhere in your environment.
Cloning a Repository
To bring a fresh copy of a repository onto your Kinsta site, use:
git clone https://github.com/USER/REPO.git
If the repository is private, you’ll need to authenticate. Since GitHub requires two-factor authentication and personal access tokens for most accounts now, the typical private-clone command looks like:
git clone https://TOKEN@github.com/USER/REPO.git
Pulling Updates to an Existing Site
If your site is already connected to a repo and you just want to pull the latest changes via SSH in one command, it looks roughly like this:
ssh user@your-ip -p port "cd public-root && git pull https://github.com/USER/REPO.git"
Swap in your actual SSH command and file path from MyKinsta, and the GitHub URL for your specific repo. For private repos with two-factor authentication, you’d include a personal access token in the URL the same way as the clone command above.
This manual pull approach works well for occasional updates, but it does mean you (or a script you build) have to trigger it yourself every time. If you want deployments to happen automatically the moment you push new code, that’s where GitHub Actions comes in.
Automating Kinsta and GitHub Deployments With GitHub Actions
GitHub Actions lets you build a CI/CD (continuous integration/continuous deployment) pipeline: push code to your main branch, and it gets deployed to your live Kinsta site automatically, with no manual SSH step required.
Here’s the general setup process:
1. Get Your Site’s Files Into a Repository
Download a backup of your existing site from MyKinsta (Sites → your site → Backups → Create backup now), or pull it locally using DevKinsta. Add a WordPress-appropriate .gitignore file so you’re not tracking core files, uploads, or anything sensitive, then push the project to a new GitHub repository.
2. Store Your SSH Credentials as GitHub Secrets
Your deployment workflow needs to connect to your Kinsta server, which means it needs your SSH credentials — but you never want those sitting in plain text inside your repository. GitHub Secrets solves this. In your repo, go to Settings → Secrets and variables → Actions, and add entries for your server IP, SSH username, password, and port (all available from your site’s Info page in MyKinsta).
3. Generate and Register an SSH Key
SSH into your Kinsta server and generate a new key pair:
ssh-keygen -t rsa -b 4096 -C "your-email@example.com"
Then copy the public key’s contents and add it to GitHub under Settings → SSH and GPG keys → New SSH key.
4. Point Your Server’s Git Config at GitHub
Back in your Kinsta server’s terminal, navigate to your site’s live directory, initialize Git, and set the remote to your repository:
cd /www/your-site/public git init git remote add origin git@github.com:your-username/your-repo.git
Test the connection with ssh -T git@github.com — a successful authentication message confirms you’re ready to deploy.
Important: if you’ve restricted SSH access to specific IPs in MyKinsta, you’ll need to remove that allowlist — GitHub Actions runs from dynamic IP ranges that can’t be reliably whitelisted in advance.
5. Write the Deployment Workflow
Inside your repo, create a .github/workflows/deploy.yml file. At a high level, this workflow should:
- Trigger whenever code is pushed to your
mainbranch - Check out the latest code
- Open an SSH connection to your Kinsta server using the secrets you stored earlier
- Run
git fetch origin mainfollowed bygit reset --hard origin/mainon the server, so the live site matches exactly what’s in your repo
6. Test It
Push a small, low-risk change to your main branch and watch the Actions tab in your GitHub repo. You’ll see real-time logs of the deployment, including any errors if something in the pipeline needs adjusting.
Should You Use Git/GitHub Directly, or a Plugin Instead?
If full Git workflows feel like overkill, plugin-based alternatives like WP Pusher let you deploy from GitHub without learning Git or SSH at all. That’s a reasonable choice for smaller teams or solo site owners who want version control benefits without command-line overhead.
For development teams already comfortable with Git, though, direct SSH access plus GitHub Actions gives you a far more flexible and standard CI/CD setup — and it’s available on every Kinsta hosting plan without needing to install anything extra.
Kinsta and GitHub: Frequently Asked Questions
Do I need a paid GitHub account to deploy to Kinsta?
No — GitHub Actions is available on free GitHub accounts, with generous monthly minutes for public and personal repositories. Larger private/team usage may eventually require a paid GitHub plan, but it’s not required to get started.
Does Kinsta support automatic deployment out of the box?
Kinsta doesn’t currently offer a one-click “push to deploy” feature natively, but SSH access on every plan makes it straightforward to build your own pipeline using GitHub Actions, GitLab CI/CD, or Bitbucket Pipelines.
What if I’m not comfortable with the command line at all?
Plugin-based tools like WP Pusher are built specifically for this — they handle the Git and deployment logic behind a simple WordPress admin interface.
Final Thoughts on Using Kinsta and GitHub Together
Whether you’re just getting familiar with what GitHub is, pulling a repo manually over SSH, or wiring up a full CI/CD pipeline with GitHub Actions, pairing Kinsta and GitHub gives you the full range of Git-based workflows without fighting your hosting environment. Start simple with manual pulls if you’re newer to this, and graduate to automated deployments once your team’s release process is consistent enough to benefit from it. If you’re evaluating hosting providers with strong native Git and GitHub support, Kinsta’s managed WordPress hosting is built with exactly this kind of workflow in mind.