gormus/wordpress

WordPress managed via Composer.

1.0.0 2019-09-15 22:02 UTC

This package is auto-updated.

Last update: 2024-04-14 10:57:10 UTC


README

This is a WordPress project managed via Composer

This project serves as an example, and a baseline for Composer managed WordPress projects.

It's built using John P. Bloch's composer-ized WordPress mirror for the core; WordPress Packagist for registered WordPress plugins, and themes; and oomphinc/composer-installers-extender package for custom installation path support.

Besides the WordPress core, following also added as minimalist examples:

Installation

composer create-project gormus/wordpress your_folder

PHP_CodeSniffer

The first time this project is installed, WordPress coding standards are installed as well. They can also be installed via following command: composer run-script install-codestandards

Try running ./vendor/bin/phpcs -i to list all installed standards; following should be listed in the output: WordPress, WordPress-Extra, WordPress-Docs and WordPress-Core.

The installed code sniffer, and standards can be used either via Composer, in shell scripts, or even in your favorite IDE. Here are a few examples:

Run PHP_CodeSniffer in current directory using WordPress standard:

composer run phpcs .

Fix wp-config.local.php file using WordPress standard:

composer run phpcbf wp-config.local.php

Configure Visual Studio Code and phpcs plugin to use WordPress standard

{
    "phpcs.standard": "./vendor/wp-coding-standards/wpcs/WordPress/ruleset.xml"
}