Skip the cost of hosting and transfer billing to your client with one click!

Learn More

Help articles General Questions

How can I use Git to publish my site on Flywheel

Flywheel recommends storing themes and code in a version control system like Git, and supports deploying from Git using DeployHQ. (HINT: this is how we deploy the site).

DeployHQ allows you to set up all types of manual and automatic deployment for your sites. It supports Git, Mercurial, and Subversion code repositories, and can deploy to many types of destinations including FTP/SFTP, Amazon S3, and more.

For the purposes of deploying to Flywheel, we are going to focus on using DeployHQ to deploy a Git repository to your Flywheel site via SFTP.


In order to utilize DeployHQ to publish your Git repo to Flywheel, you will need the following prerequisites:


A Git repo containing your WordPress code / theme.

We recommend Github or Bitbucket for Git hosting


A DeployHQ account

The free account is good for 1 project and 10 deploys / day

The steps for connecting DeployHQ and Flywheel are simple, and take just a few minutes to set up. Once you’re set up, you can choose from two types of deployments:

Manual deployment To deploy your code, you log into the DeployHQ dashboard and initiate the deployment manually
Automatic deployment Your code will be deployed to Flywheel automatically on each commit

The method used is up to you, and you can switch at any time.

To get started, log in to your DeployHQ account and create a new project:


From there, add the details of your Git repository. You can either specify the full URL of the repository, or for Github and Bitbucket you can enter your username / password and DeployHQ will automatically pull a list of your repos:


Once you’ve selected your repository, you will need to configure the server for the deployment. These are the settings for your Flywheel site that will be the destination for the files that are deployed from your Git repo.



Name The name of the destination server Example: Flywheel Site
Protocol SSH/SFTP
Port 22
Username Your Flywheel username. Note: This is NOT your email address
Password Your Flywheel password
Use SSH Keys for authentication? Unchecked
Path on server The full path on the Flywheel SFTP server where you’d like to deploy to. Example: /username/my-flywheel-site/wp-content/themes/my-theme

Deployment Options

Notification Email Address Your email address
Branch to deploy from The branch you’d like to deploy from. (Example: master)
Environment The name you’d like to give this environment. (Example: Production)
Subdirectory to deploy from The subdirectory in your repo that corresponds to the destination path on the server. (Example: wp-content/themes/my-theme)


It’s important that the settings for the Path on server and Subdirectory to deploy from are correct. These two must match up, or else you risk deploying the wrong files.

Flywheel recommends deploying only your theme. You cannot deploy your entire WordPress installation, as Flywheel write-protects the core WordPress files.

The final step to configuring DeployHQ to deploy to your Flywheel account is to create a deployment. To do so, select the server you just created, and select which revisions you’d like to commit.


If this is your first deployment, we recommend deploying all changes. To do so, leave the first field blank, and in the second field make sure it’s the latest commit. This will bring over all changes in the repo.


Clicking “Run Deployment” will take your code from the Git repository, and will deploy it to your Flywheel site via SFTP. Once the deployment is complete, you will be notified by email, and your changes will be live on Flywheel! 


Configuring a deployment with Git + DeployHQ will overwrite any files uploaded normally via SFTP. If you choose to do this, you should stop updating themes via SFTP, and only do so via Git. 


To run this deployment in the future, you simply need to log into your DeployHQ account, and click the “Deploy Now” button, and all the latest committed changes will be pulled from your Git repo and deployed to your Flywheel account.

Was this article helpful?

  • Billing & Accounts

    Questions relating to payments, billing and managing your account on Flywheel.

    14 Articles
  • Blueprints

    Learn everything there is to know about what Blueprints are, how to create them and how to make the best use of them.

    5 Articles
  • Database

    How to access your WordPress database to make changes and update content.

    3 Articles
  • Domain Names

    Details about how to manage DNS and point your domain names at Flywheel.

    14 Articles
  • Frequently Asked

    The most commonly asked questions, and a few we just think you should know.

    26 Articles
  • General Questions

    Questions that don't fit elsewhere, or those about Flywheel in general.

    56 Articles
  • Getting started

    Everything you need to know to get your first Flywheel site up and running.

    17 Articles
  • Local by Flywheel

    Everything you need to know about our amazing, free local WordPress development software for Mac and PC.

    18 Articles
  • Organizations

    Everything you need to know about managing your team with our Organizations feature.

    8 Articles
  • Plugins

    Which plugins work best, which plugins work worst, and everything in between.

    7 Articles
  • Security

    Details about everything Flywheel does to makes your site so secure.

    15 Articles
  • SFTP

    Information on setting up and troubleshooting with SFTP connections and file transfers.

    5 Articles
  • Simple SSL

    All there is to know about our free, automatically installed and activated SSL certificates.

    9 Articles
  • Staging

    How to get the most out of Staging, which allows you to duplicate a site, make changes, and then push those changes to the live site.

    6 Articles
  • White Label

    Everything you need to know about our Whitelabel subscriptions for branding and reselling Flywheel.

    4 Articles

Flywheel help

Help is just a click away! Log into the Flywheel dashboard to instantly chat with an expert, open a ticket, or follow along with in-depth documentation. We happily offer support 24 hours a day, 7 days a week, 365 days a year!

Log in

Try it yourself. It's free & takes less than 60 seconds. Sign up