Skip to content

Instantly share code, notes, and snippets.

@charmoney
Created February 28, 2025 16:22
Show Gist options
  • Save charmoney/85bb03b45b80b7f54b5e75440a6dafd1 to your computer and use it in GitHub Desktop.
Save charmoney/85bb03b45b80b7f54b5e75440a6dafd1 to your computer and use it in GitHub Desktop.
Kinsta hosting: Install PHP Code Sniffer with WordPress coding standard
#
# Working process as of 02/2025 using Kinsta's default ~/.profile
#
# Composer global installation.
composer global require "squizlabs/php_codesniffer=*"
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --dev wp-coding-standards/wpcs:"^3.0"
# Configure phpcs default.
phpcs --config-set default_standard WordPress
# Kinsta's standard ~/.profile adds ~/bin to the path if it exists.
mkdir ~/bin
ln -s ~/.config/composer/vendor/bin/phpcs ~/bin
ln -s ~/.config/composer/vendor/bin/phpcbf ~/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment