It’s no secret that many open source developers love GitHub – it’s an amazing service that makes sharing and working on open source projects really easy, both from a project management standpoint, and from a developer/contributor standpoint.
But if you’re in the business of building WordPress plugins, and you enjoy taking advantage of the services offered by the GitHub plugin repository, then one of the things that makes it difficult to keep your work on GitHub is the lack of ability to update your plugin.
Of course, projects have been released that allow you to sync both repositories, but if you’re interested in going 100% with GitHub, then check out the GitHub Updater Plugin.
Put Your WordPress Projects On GitHub
Just as the plugin’s `README` describes:
A simple plugin to enable automatic updates to your GitHub hosted WordPress plugins and themes.
And that’s really about it, but if you want to include support for it in your project, there are two prerequisites:
- This plugin must be installed in the end-user’s WordPress installation
- Your plugin needs to include the `@GitHub Plugin URI` header in the header comment block of your WordPress plugin
Sure, you could technically bundle this with your plugin, check if it already exists, and if it doesn’t, then include it; however, that’s not the purpose of this post.
Instead, I’m far more interested in sharing the fact that it’s completely possible to host your plugin on GitHub, and allow it to be updated when the `master` branch is updated, or any branch is updated, for that matter.
Though I initially discovered this particular project thanks to Gary Jones while working on a plugin, the project does support themes, as well.
This means that you can host your themes on GitHub, add support for this plugin in your theme, then have updates pushed out to your users via GitHub.
What Do You Lose?
This may or may not be a loss depending on how you view your plugin; however, your plugin will not longer be discoverable form the ‘Add New’ search field in the Plugins dashboard.
Additionally, you lose ratings as well as the built-in support forum (though some may not see this as a loss, but – more seriously – gain the issue tracker.
Then again, you can still sync code across repositories using a variety of scripts that are available. For example, Mark Jacquith has a script that will do just that.
Regardless, there are always going to be tradeoffs for things like this, so there’s no one way to suggest that you should absolutely use this plugin, or you should absolutely not use this plugin.
I’m a fan of it, and I’ve even got support for it in the WordPress Plugin Boilerplate because I’d love to see more plugins adopt it; however, I’m not anti-WordPress Plugin Repository, either.
Make up your mind and go with it. This is just a really cool plugin that makes using GitHub a bit easier :).
Leave a Reply
You must be logged in to post a comment.