Installation

Last updatedView as Markdown

Install the standard as a WordPress plugin, or install the development toolchain in a checkout. Generated plugins keep these same commands after the identity is renamed.

Install the plugin

Composer package name: linchpin/plugin-scaffold. The plugin header also allows uploading a release zip.

Require the package bash
composer require linchpin/plugin-scaffold

This repository's composer.json registers https://packagist.linchpin.com in addition to the default Packagist. House development packages such as linchpin/coding-standards resolve through that repository.

A GitHub Release attaches plugin-scaffold.zip after Plugin Check passes. Upload that zip through WordPress when you are not installing from Composer.

The plugin will not boot without an autoloader. plugin-scaffold.php requires vendor/autoload.php when that file exists. If the Bootstrap class is missing, administrators who can activate plugins see:

plaintext WordPress admin notice
Plugin Scaffold could not load its dependencies. Run composer install inside the plugin directory, or install a release build.
Exact string from plugin_scaffold_missing_autoloader_notice().

Development checkout

Prerequisites: PHP 8.3, Node from .nvmrc (24.13.0), and the tools scripts/build.sh requires when you build a zip (npm, composer, zip, rsync, php).

  1. Install PHP dependencies

    From the repository root, run composer install. This pulls runtime and development packages, including the Linchpin coding standards from packagist.linchpin.com.

  2. Install JavaScript dependencies

    Run npm install. The lockfile is npm. CI uses npm ci.

  3. Build the admin bundle

    Run npm run build. Root webpack compiles src/admin/index.js to build/admin.js and build/admin.asset.php. The distributable zip asserts both files exist.

  4. Run the gates

    Run composer test for every static PHP gate plus the unit suite. See quality gates.

README development commands bash
composer install && npm install && npm run build && composer test

npm install runs prepare, which runs husky and installs the commit-msg and pre-commit hooks.

If you applied the blocks overlay, also install and build the nested blocks/ workspace. That overlay merges extra root scripts, including install:all and build:all.

What the zip contains

bash scripts/build.sh writes build/plugin-scaffold/ and build/plugin-scaffold.zip. It is the same command the release workflow, Plugin Check, and a local developer run. Details are on build and release.

Success
A checkout is ready when

vendor/autoload.php exists, build/admin.js exists, and composer test passes. WordPress then loads plugin-scaffold.php on plugins_loaded.

plugin-scaffold.php

Have a question about this page?

Linchpin assistant

Was this helpful?