Created
February 28, 2025 16:22
-
-
Save charmoney/85bb03b45b80b7f54b5e75440a6dafd1 to your computer and use it in GitHub Desktop.
Kinsta hosting: Install PHP Code Sniffer with WordPress coding standard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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