WP Pusher is a new plugin for WordPress that allows you to install and update plugins or themes via an external Git repository. We'll take a look at this plugin and its advantages in a git development workflow.
The idea behind this plugin is to ease deployment of custom themes and plugins, that do not live in the official WordPress theme or plugin directories, but on a code hosting site such as GitHub or BitBucket. The plugin leverages the built-in WordPress updater to pull in updates from external repositories. This is especially useful on shared hosting environments that may not have git installed or do not allow it.
Install WP Pusher
First, we'll need to install the WP Pusher plugin. For , WP Pusher It is 100% free to use for open source code, in public repositories, but it requires you to register before downloading. Once registered, you'll get a download link in your email. Then just install it by unzipping it into your /wp-content/plugins folder, or through Plugins > Add New > Upload Plugin in the WordPress admin.
Once we have WP Pusher installed, it can then be used to install a plugin or theme from GitHub.
Install custom theme from GitHub
Let's run through an install of a custom theme: Simple Grey, which I developed for my personal website, and is hosted in a public GitHub repository.
You'll want to grab the URL of your repository, in this case https://github.com/peterhebert/simple-grey. We don't need the complete URL just the 'user_name/repository_name' portion. In our case, this will be peterhebert/simple-grey.
From the WP Pusher settings page, click Install Theme. Paste in this repository handle into the Theme repository field. Make sure that the Repository Host field is set to GitHub, and then click Install Theme. It will then go to GitHub, and download the theme to your site.
Once you have the theme installed, you have two options for updating it: manual updating, or Push-to-deploy. Manual updating can be done from the WP Pusher > Themes settings page (or Plugins for a plugin).
To use the Push to Deploy method, you'll need to set up a web hook on the repository itself, which is only available to those with priveleges to manage the webhooks settings for the repository.
Verdict
This plugin is quite useful indeed for web hosts that don't allow git. For servers that you have full control over (VPS, dedicated hosting), you may want to stick with SSH and git, unless you really prefer to work exclusively in the WordPress admin.