WP Pusher Aims to Provide Pain-Free Deployment of WordPress Themes and Plugins from GitHub

wp-pusher

If you create plugins and themes for clients and host them on GitHub, then you may have encountered the hassle of having to move those files over to your client’s installation. On super cheap hosting packages, where SSH access is not an option, this process inevitably requires manually copying files over via FTP.

This is the problem that Danish developer Peter Suhm aims to solve with his new WP Pusher product. The plugin aims to bring pain-free deployment of WordPress themes and plugins directly from GitHub and Bitbucket.

“If you happen to be an actual developer, I guess you have a few preferences as to how you manage and deploy your code,” Suhm said. “I’m talking about stuff like version control and automated deployment scripts. Good luck with that on your clients’ cheap-ass shared hosting account.”

Suhm developed WP Pusher with the vast majority of cheaply-hosted WordPress sites in mind. Additionally, he wanted to eliminate some of the hangups with more expensive hosts. “Even if you are running a shiny new VPS and have SSH access, Git installed and you think all is well, soon you’ll realize other weird things,” he said. “You can’t have symlinks in your /plugins folder just to mention one.” WP Pusher gets around these limitations via a simple plugin that does not require Git or SSH.

How Does WP Pusher Work?

Once installed, WP Pusher allows you to install and manage all of your GitHub or Bitbucket-hosted plugins in one central dashboard in the admin. Enabling the Push-to-Deploy feature will have your code update itself automatically every time you push to GitHub or Bitbucket.

manage-wp-pusher-themes

The plugin supports private repositories in its free edition and includes support for branches in the Pro version.

wp-pusher-install-plugin

WP Pusher is essentially an extension of the built-in auto updater in WordPress, which Suhm explained in the plugin’s release post:

After a lot of prototyping, and hacking around with the WordPress core, we came up with a smart solution. By utilizing the WordPress core upgrader classes, we could solve the problem in a really clean way.

Since WordPress already knows how to pull stuff from a remote source and install it, we realized that by working together with WordPress, instead of just throwing random automated SSH and FTP scripts at the server, we could just have WordPress do the work for us -with a lot of tweaking of course. In the end, our solution doesn’t do anything that is not native to WordPress. It’s all core functionality.

WP Pusher does everything in the plugin and does not require shell access. It communicates with GitHub via a token stored on your server and operates using WordPress’ core updater capabilities.

Different Approaches to Managing WordPress Projects with Git

In order to use WP Pusher, each GitHub-hosted plugin and/or theme will need to be in its own repository. While beta testing WP Pusher, Suhm found that developers have differences in how they manage WordPress projects with Git. The most common one he’s encountered is one installation, one repository, where the entire WordPress installation, including themes and plugins, is under Git control. Suhm believes that this approach is fundamentally broken, given that it requires you to keep a lot of 3rd party code under version control.

WP Pusher operates under a “one package, one repository” approach where each theme or plugin is its own entity. This method also offers the advantage of being able to share theme/plugin code across multiple projects.

“WordPress relies heavily on the auto updater, which would make your version control a mess,” Suhm explained. “If you do have something that is more enterprise than most WordPress setups, you should consider a custom setup that allows better for version control of core. Packages should still, in my opinion, each have their own repositories, since they are logically their own entities.”

WP Pusher is structured around this approach for managing WordPress projects with Git. You may need to restructure some of your repositories if you want to be able to use the plugin.

The free version offers unlimited themes and plugins, unlimited repositories, and support for both GitHub and Bitbucket. It does not, however, include email support. WP Pusher is compatible with WordPress multisite and will show up in the network admin when activated. It doesn’t currently support Composer but Suhm is considering adding it in the future. The plugin is released under the GPLv2 license.

WP Pusher offers a unique take on maintaining version control for projects while not forcing WordPress to bend over backwards to provide it in the admin. It leaves the version control to GitHub and/or Bitbucket and uses WordPress simply for deployment.

Setup is simple and the plugin will work virtually everywhere, even on the cheapest hosting. If you like the idea of maintaining version control on a plugin/theme basis, you can download the WP Pusher plugin for free from the project’s website.

19

19 responses to “WP Pusher Aims to Provide Pain-Free Deployment of WordPress Themes and Plugins from GitHub”

  1. That’s amazing service. I’m using dploy.io to deploy code to my servers, but the free plan allows only 1 repository (it supports both public and private repos). This service looks very promising, and the best part is it’s integrated with WordPress. I love it!

  2. This looks like a really nice solution for easily handling updates for GitHub hosted plugins. I have a couple of plugins on my site which are hosted there and I end up upgrading them once every year or so, which is not the best :/

    I suspect (but am not sure) that it will break with plugins that include submodules or use an abnormal folder structure (some GitHub repos include the plugin folder itself rather than putting everything in the root like WordPress expects). Anything using Composer will probably fail too.

  3. The plugin works very well. I’m doing a WordCamp talk on it and similar plugins like VersionPress and Revisr this weekend. WP Pusher is good for not only “cheap-ass shared hosting” (heh) but for environments where we the developers have restricted access to the client’s admin. I’m thinking particularly of the one client who has 17k users on a multisite network with hundreds of sites, and the chances of us gaining super-admin access are, well, non-existent. We currently use a theme with Github updater built in, but WP Pusher will make it easier, and we can use (free) private Bitbucket repos as well. Use of repos in this way also allows us to reconsider our current deployment techniques, e.g. using dploy.io. Nice work Peter! We owe you an øl ;)

  4. Hey Matt,

    Does GitHub Updater not do what you need? I do realize the WP Pusher fills a slightly different need. GitHub Updater doesn’t need to be built in to the theme but is better installed as either a mu-plugin or just an additional plugin. It also will update public and private repos from both GitHub and Bitbucket.

    If there’s something it’s not doing let me know.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.