- Install WP-CLI
- Install PHPUnit
- Install WordPress PHPUnit or Download for Windows
- Download this plugin and extract in your stand alone folder OR in the installed WordPress /wp-content/plugins/demo-plugin-test folder.
- Run the command
phpunit
(Recommend PHPUnit 11 and PHP 8.4). - The result should be:
OK (1 test, 2 assertions)
- Install PHP_CodeSniffer (recommended to install via Composer and set Windows environment
PATH
to vendor/bin). - Install PHPCompatibilityWP (via Composer).
- Install WordPress Coding Standard (as standalone but DO NOT follow Add its path to the PHP_CodeSniffer configuration step).
- Manually edit vendor/squizlabs/php_codesniffer/CodeSniffer.conf file to prepend
../../../wpcs,
value.
- Manually edit vendor/squizlabs/php_codesniffer/CodeSniffer.conf file to prepend
- Run the command
phpcs
. - The result should be:
E 1 / 1 (100%)
And follow with more details.