Note: I recently wrote a guest post on the WP Tavern about using Docker for WordPress development. In the post I talk about what Docker and Docker Compose is and how you can use them to create your WordPress development environment. The article on the Tavern is a more in-depth introduction to using Docker. Here, I just wanted to quickly share and walk you through the Docker Compose file I use for my setup while working on WP Pusher (Git for WordPress development).
As part of the Git for WordPress video course, Danny van Kooten shows how he uses Git to release a new version of his plugin MailChimp for WordPress.
Danny van Kooten is the founder of Ibericode and the creator of MailChimp for WordPress, one of the most popular WordPress plugins on WordPress.org. I have known Danny for a while and I know he has a pretty solid workflow, so I reached out and asked if he would like to share it, which he agreed to. Thank you, Danny!
There’s a question I get quite often about WP Pusher and that is: “do you handle updates to the database as well?”. The answer to that question is “no”. WP Pusher is meant as a tool to deploy code changes to plugins and themes that are under version control with Git. I always tell people that they should take a look at the Migrate DB Pro plugin instead, since it does exactly that. Recently, I started talking to Brad, the creator of Migrate DB Pro and guess what he told me: Just as people ask me if WP Pusher can deploy database changes, people ask him if Migrate DB Pro can deploy source code changes. See where I’m going with this?
NB. I wrote a follow-up piece about this topic on the WP Tavern.
Yesterday, I was watching the WP Sessions stream, where Josh Pollock talked about developing WordPress plugins using Composer. Josh did a great job introducing Composer basics, however, I still feel a need to comment on one specific point that was missing in the presentation: Loading 3rd party dependencies with Composer doesn’t change the fact that WordPress isn’t designed to handle 3rd party dependencies in plugins.
This is the story about how I wasted 3 days, but also, which is more important, how I set up continuous integration for WP Pusher with CircleCi. With a continuous integration service, you can have your tests run on every commit and ensure that nothing is broken. That is, if you have some tests to run of course.
Composer seems to be something everyone is talking about in the WordPress community these days. It is a great tool for developer productivity and code reuse. However, if you are trying to use Composer to distribute your WordPress product to end users, you might be doing it wrong ™.
These days, I’m working on the plugin that makes WP Pusher update themes and plugins directly from GitHub. Having been away from serious WordPress development for quite a while, I thought it would be interesting to highlight a few of the approaches I have been using during the development of the plugin.