Hello, WP Pusher!
WP Pusher is a deployment tool for WordPress developers that can install and update themes and plugins directly from your Git repositories. This is an alternative to all the other ways in which WordPress developers have historically deployed their code, such as manually copying files with FTP. Yikes!
WP Pusher is connected to your Git repositories and, if enabled, will automatically update your plugins and themes every time you commit new code, merge a pull request or release a new version. The great thing about WP Pusher is that it's just a plugin that you install on your client's website and that it works even without Git installed on the server.
The custom plugins and themes you develop should be kept under version control. In order to use WP Pusher, you must use Git as your version control system (VCS) and host your code on GitHub, Bitbucket or GitLab (hosted or self-hosted). This is because WP Pusher uses the APIs of these services to pull your code whenever it needs to install or update a plugin or theme.
The recommended way to structure your projects is to have each plugin and theme in their own Git repository. This makes managing the code simpler and makes it easier to reuse code across projects. If you have a few utility plugins you use for multiple clients, WP Pusher makes it super easy to keep all of those up-to-date in all of the different places they are installed. However, it is not required that you keep everything separate. WP Pusher supports multiple different workflows:
- Keep every plugin and theme in its own repository (recommended - see above)
- Keep multiple themes and plugins in one repository
- Keep all of /wp-content in one repository
- Keep all of WordPress in one repository (not recommended)
WP Pusher won't get in your way, even though we have a recommended way of organizing your code. With the subdirectory option, you can tell WP Pusher where in the repository a plugin or theme lives. You can learn more about how to organize your repositories in this guide.
WP Pusher is installed on your production, or "live", site. From here it can install and update the plugins and themes you are hosting with GitHub, Bitbucket or GitLab. Locally, you won't normally need WP Pusher, since this is where you are using Git to commit and push your code to an online repository.
It's very common for developers to also have a staging environment too. Usually it also makes sense to have WP Pusher installed on the staging server, possibly with Push-to-Deploy (automatic updates on every push) enabled. A staging server allows you to review new features and designs in an environment as close to production as possible.
When you are working with Git, you should be committing often. The more you commit, the better it usually is. The smaller your commits are, the easier it is to spot which changes were introduced when. A rule of thumb is that if your commit message includes an "and", you probably should have committed twice instead.
If you want a deep dive into Git, here are 36 free videos on Git for WordPress developers.
- Download the WP Pusher plugin
- Read the "Getting Started" guide
- Let us know if you have any questions!
Need any help?
If you have any questions about WP Pusher, Git or WordPress, our email is email@example.com. Don't hesitate shooting us a message! You can also click the little ❤️ in the corner of this page.