Wednesday, October 7, 2015

Containerized WordPress Development with Dockunit.io

Writing WordPress themes and plugins to be publicly distributed requires meeting minimum system requirements, specifically PHP 5.2.4. Since WordPress supports PHP 5.2.4 so must your public plugins and themes. PHP has changed immensely between PHP 5.2 and now PHP 7 RC.

To ensure your software is compatible with all of the WordPress community it's important to test your software in a few major PHP versions, i.e. 5.2.4, 5.6, and 7.0 RC. We could of course test more versions, but picking three major ones is a safe bet.

How do we test our plugin or theme in three major versions of PHP? Generally, our system can only run one version of PHP at a time. We could spin up different virtual machines with different PHP versions, however this is pretty difficult. The answer is containers with Docker.

Dockunit is a utility for running containerized software tests. Let's setup Dockunit to be used with a plugin or theme (this guide assumes you are working on some sort of Unix system such as OS X or Ubuntu):

Continue reading %Containerized WordPress Development with Dockunit.io%


by Taylor Lovett via SitePoint

No comments:

Post a Comment