Many developers use sites like GitHub, BitBucket, and GitLab to automatically deploy changes to a staging or live website. For most developers, the workflow goes something like this: you develop a theme or a plugin locally and then host it somewhere — for me, it’s usually GitHub.
Over the years, GitHub has become one of the popular choices for developers and pushing your projects to its repo has become an integral part of web development. Doing things this way can help you sync it up with a live WordPress installation. Syncing your GitHub repositories with WordPress manually is somewhat tedious because you have to repeat the process over and over. It also involves copying files to FTP when you hand over the project to your client (on shared servers) or setting push Git hooks to push and then fetch/pull on all sites. This is burdensome and time-consuming.
Third-party automation and integration tools have taken my development workflow to the next level. While it has made it easier to simplify tasks, integration of Git-managed themes and plugins has been challenging. In this article, I will discuss how to automatically sync GitHub repositories with WordPress to deploy any changes. Let’s begin!
WP Pusher
WP Pusher is one of the most comprehensive plugins in this context. Developed by Peter Suhm, the plugin helps you to sync WordPress themes and plugins directly from GitHub, Bitbucket or GitLab.
Easy of Use: If you are reading this post, then chances are that you may not be a GitHub expert (if that’s a thing these days). So, syncing repositories with live sites may sound like a tough job to do. WP Pusher simplifies this tenfold by helping you to escape the task of copying files over FTP/SSH. Once the plugin is activated, you can start managing all your GitHub hosted projects from the dashboard.
Push-to-Deploy: The plugin’s magic lies in its Push-to-Deploy feature which is a small checkbox inside the settings. It automatically updates your themes and plugins the very next moment you push your commits to GitHub, without the fuss of updating and maintaining newer versions manually.
Pro Version: All in all, WP Pusher dramatically improves the experience of integrating Git with WordPress. Despite being free, WP Pusher is also available at an affordable price ranging from $39 to $199. In its pro version, you can find some extensive features to sync your private repositories.
GitHub Updater
GitHub Updater is an intuitive plugin by my friend Andy Fragen which automatically serves updates for your GitHub, Bitbucket, or GitLab-hosted WordPress plugins and themes.
The plugin particularly useful you’re working for a client with a hosting account that doesn’t support Git. Your plugin and theme’s header contain information about the location where it is hosted on GitHub. The plugin leverages this information to update any GitHub-hosted WordPress plugin or theme.
WordPress GitHub Sync
WordPress GitHub Sync syncs content with a GitHub repository and allows collaborate content creation on your WordPress site. Developed by
plugin includes several useful features.Sync Content: The plugin allows you to sync the content of two different WordPress installations using GitHub. You can also preview the content before you make final deployment to the server.
Versioning: With WordPress GitHub Sync you can easily version your content in GitHub, allowing you to keep your users up-to-date on changes.
Submit Improvements: This plugin allows you submit your improvements by implementing the GitHub’s pull request model.
Collaborations: It allows different teams to write and edit their posts using GitHub. Even non-technical writers can draft and edit a Jekyll site in WordPress’s editing interface.
WP Migrate DB
This is yet another fantastic WordPress plugin that allows you to export your database and sync it. It doesn’t really have to do anything with Git but it helps keep different environments in sync.
Conclusion
The aforementioned plugins are excellent auto-sync solutions between Git hosting and WordPress. Aside from the premium version of WP Pusher, all of these plugins are free to use.
So, what are you waiting for? Improve you dev workflow by adding these plugins to your stack.
Have you tried any of these before? Share your experience and views about it. As usual, don’t hesitate to leave any questions or comments below, and I’ll aim to respond to each of them.
No Comments