Git your WordPress on

The following screencast is a super special demo for the 2013 Buffalo WordCamp attendees on using WordPress, Git and Post Receive Hooks. We also make sure to showcase how these same steps are achieved using another service called Bitbucket.

You may notice in the demo a few commands I alias such as “g” or “gc.” It’s important to remember when you see these commands that they’re the same as git which I alias through “g” and git commit -m which I alias using the two characters “gc.”

8:07 | Using Git with WordPress to control versioning and automatic deployment

The Posthook

<?php `git pull`;
Place the following file named posthook.php containing the line above within your project’s root directory.

If you’re new or a veteran to Github I suggest starring a repo I’ve created that allows for you and I to interact on Github and practice “All things Git.” Feel free to send me a pull request or ask any questions through the project’s issue tracker. Also included in this repo are a handful of helpful git commands and resources to help you achieve Git bliss (Practice Git: You can also reference a past article of mine discussing how to maintain and keep your Git installation up to date along with my article on the ease of ssh using a process call Silky Smooth Hopping.

Slides from my talk can be found at and also include some various links and suggested readings I highly encourage all users of WordPress and Git to checkout. If you have further suggestions to add for this process we’ve discussed please leave a comment below with your awesome and helpful advice, tips and tricks. Enjoy working with your new WordPress and Git workflow.


Web Development & Design, Technical Writing, Interaction Design, Open Source Maker & Contributor. Helping Create A Better Web.

Leave a Reply

Your email address will not be published. Required fields are marked *

show formatting examples
<pre class="language-[markup | sass | css | php | javascript | ruby | clike | bash]"><code>
…code example goes here…

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Preview

  1. John Doe shouted this comment preview: