Git Deployments on SpudPress

Our advanced deployment system for seasoned developers

This tutorial covers how to setup Git deployments with SpudPress


SpudPress supports deployments via git, this is useful if you’re already using git to manage your site.

Deploying file changes via git is as simply as:

git push spudpress master

Preparing your git repository

We’re trying to make minimal assumptions about your existing workflow, but there’s one thing we ask of you.

Your git repository should have a public folder that contains the full WordPress install.

We do it this way so you can keep files in the project root directory that you wouldn’t want to be publicly accessible, e.g. your Vagrantfile, sass/less files or other files that might be sensitive.

Here’s an example of what that file structure looks like:
Screen Shot 2015-11-24 at 11.23.05 PM

If you have an existing git repository

Already have a git repository set up? Great! All you need to do is add an extra git remote.

Head to the Deploy tab in your sites dashboard and find your full git URL, then just run:

git remote add spudpress 

If you want to create a new git repository

In that case, you just want to download and set up WordPress locally. Here’s what that would look like:

mkdir mysite && cd mysite
tar xvf latest.tar.gz && rm latest.tar.gz
mv wordpress public

git init
git add -A .
git commit -m 'Initial commit'
git remote add spudpress 

Pushing changes

Got your git remote configured now? Awesome!

Now you can just push changes directly to the spudpress remote.

git push spudpress master