Git Overview

SpinupWP fully supports Git-based sites out-of-the-box, including support for Bedrock. We have our own git and Composer template, which is designed for SpinupWP. You can even configure push-to-deploy so that any code changes are automatically deployed to your server as they’re pushed to a Git provider like GitHub or Bitbucket.

How It Works

Whenever a Git deployment is triggered (either manually or via push-to-deploy), SpinupWP will SSH into your server and perform the following commands:

git remote update
git checkout -f BRANCH

This will overwrite any modified files within the site’s files directory that are managed by Git. Files that aren’t managed by Git, or files specified within a .gitignore won’t be modified or deleted.

For example, let’s say you modified the wp-config.php file on your server, but you also store this in Git. The next time a deployment is triggered, the wp-config.php file will be overwritten on the server and your changes will be lost.

Running Git Commands

SpinupWP uses a mirror repo to deploy your site to the server. This means that you can’t run Git commands directly from the files directory. Although you shouldn’t need to run Git commands directly on your SpinupWP server, it can be useful in some scenarios. For example, you may want to see which files are in your site’s files directory but aren’t stored in Git.

When running Git commands, you should run them from the site’s root (i.e. /sites/yourdomain.com/), and you must specify both the Git and working directories:

git --work-tree=./files --git-dir=./git status

Advanced Git Deployments

While the SpinupWP push-to-deploy feature is very useful, it only covers the basics of what is possible with automated deployments. Tools like Buddy and DeployBot allow for much more advanced automated deployment systems, including things like atomic deployments, isolated build environments, abort deployment on build failure, and integrations into various third-party tools. We recommend reading the automated deployments section of our Deploying WordPress guide for more details on how to use these tools.

Start Your 7-Day Free Trial

Start your SpinupWP journey today and spin up your first server within minutes.

Subscribe to get the latest news, updates and optimizations in performance and security.

Thanks for subscribing 👍

To receive awesome stuff, you'll need to head to your inbox and click on the verification link we sent you.
Make sure to check your "spam" folder or your "promotions" tab (if you have Gmail).
If you're still having trouble, then messages us at sudo@spinupwp.com.

You are already logged in

It looks like you are already logged in to SpinupWP.

Please log out of this account to continue.

Registration Successful

Thanks for registering for a new
SpinupWP account.

Before getting started, could you verify your email address by clicking on the link we just emailed to you?

SpinupWP

Free Trial

Start Your 7-Day Free Trial

No credit card required. All features included.

By signing up to SpinupWP, you agree to our Terms and Conditions.
For privacy related information, view our Privacy Policy.