Skip to content

Instantly share code, notes, and snippets.

Avatar

COVERT NINE covertnine

View GitHub Profile
@covertnine
covertnine / c9-githooks-gist.txt
Created Sep 14, 2020
Setting up GitHooks for WordPress related repos
View c9-githooks-gist.txt
This is a brief summary of our private wiki for setting up Githooks on our servers for managing multiple WordPress sites with custom themes and plugins.
Setup
This process is a little bit involved, but hopefully we can simplify it all via a few scripts on site creation. Basically, we set up a bare repo on the remote (the server) for each plugin or theme, then create a git post-receive hook that triggers on push to that repo, which runs a script to update all the websites on the server that use that plugin or theme.
For this process, I'll walk through the necessary steps to deploy the c9-admin plugin to sites on our.serverhost.net
1) Create a bare repo on the server
Bare repositories live in /srv/git. You can either create a bare repo on init or on clone. In this case, we will create a bare repo call c9-admin.git by running:
You can’t perform that action at this time.