Category: Command Line WordPress
Dockunit: Containerized Unit Testing Across Any Platform and Programming Language
Problem: I want my application to work on all the environments I claim to support but I have no way of easily testing updates in each environment. Bad Solution: Continuously push to your remote to force Travis CI to test changes in multiple environments. Good Solution: Containerized unit testing with Dockunit. Dockunit is a simple…
Using the WordPress JSON REST API in Testing Suites with Travis CI
Problem: We are writing custom endpoints and routes that extend WP API in a theme or plugin. We want to write tests for this code and run tests in Travis CI. Right now, WP API is not in WordPress core and must be included as a plugin. Therefore, we have a WordPress plugin/theme that depends…
Run WordPress Cron on Real Unix Cron with Node.js
WordPress cron is a confusing beast. Most people don’t understand it or intentionally use it. It is not the same technology as Unix cron. Scheduled post functionality actually depends on WordPress cron. By default on every page load, WordPress checks to see if any cron events are due to fire. If an event is due,…
WordCamp Ottawa
This weekend I was lucky enough to present at the 2nd annual WordCamp Ottawa. My talk was titled “Saving Time with WP-CLI”. WP-CLI is a plugin that lets you interact with your WordPress installations via the command line. My talk runs through some cool built-in WP-CLI commands as well as creating custom commands. My slides…