This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* C9 Client Setup | |
* | |
* @package c9-starter | |
*/ | |
add_action('after_setup_theme', 'c9_client_setup'); | |
if (!function_exists('c9_client_setup')) { |