PHPUnit Compatibility and WordPress Versions

Changes to supported PHPUnit versions have been as followed:

  • In WordPress 4.4: Added support for PHPUnit 5 was added on PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 7.0.
  • In WordPress 4.7: Added support for PHPUnit 6 on PHP 7.0 and 7.1.
  • In WordPress 5.1: Added support for PHPUnit 7 on PHP 7.1, 7.2, and 7.3. PHP 7.0 remains at PHPUnit 6.
  • In WordPress 5.2: Added support for PHPUnit 7 on PHP 7.0, and PHPUnit 5 on PHP 5.6.
  • In WordPress 5.9: Added a dependency on the external PHPUnit Polyfills, which enabled support for PHPUnit 8 and 9, making it so the tests can now run on the most appropriate PHPUnit version for each PHP version.

Supported Version Chart

WP | PHP Version5.25.35.45.55.67.07.17.27.37.48.0
5.9xxxx5678999
5.8xxxx5577777*
5.7xxxx5577777*
5.6xxxx5577777*
5.5xxxx557777x
5.4xxxx557777x
5.3xxxx557777x
5.2xxxx55777xx
5.13.644446777xx
5.03.644446666xx
4.93.64444666xxx
4.83.6444466xxxx
4.73.6444466xxxx
4.63.644445xxxxx
4.53.644445xxxxx
4.43.644445xxxxx
4.33.64444xxxxxx
4.23.64444xxxxxx
4.13.64444xxxxxx
4.03.6444xxxxxxx
3.93.6444xxxxxxx
3.83.6444xxxxxxx
3.73.6444xxxxxxx

* The coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. test suite currently runs a modified version of PHPUnit 7 (which on its own is not compatible) on PHP 8. See #50902 for more information.

Last updated: