Modern WordPress plugin and theme development

2023-01-26 | WordPress

Here are a few pointers to help you with modern WordPress plugin and theme development.

Prerequisites

  1. PHP: Hypertext Preprocessor
  2. Composer
  3. NVM (Node Version Manager)
  4. PHP_CodeSniffer
  5. Varying Vagrant Vagrants

Local development environment

Development environment: Varying Vagrant Vagrants

VVV example configuration file: config/config.yml

Code quality

Make WordPress Coding Standards known to PHP_CodeSniffer.

phpcs --config-set installed_paths path/to/wordpress-coding-standards/

Use PHP_CodeSniffer like so:

phpcs --standard=WordPress my-awesome-file.php