WordPress
Notes on building and running WordPress at scale: block themes, caching, the plugin API, and the things that only break in production.

Translating a WordPress plugin, including the JavaScript
Internationalisation is making a plugin translatable. Localisation is someone actually translating it. You do the first one, and if you do it wrong the second one is impossible. This covers text domains,…

WordPress plugin fundamentals: headers, load order, hooks and options
A WordPress plugin is a folder with one header comment in it, and everything after that is hooks. This covers the header, where the file has to live, the order plugins load…

Custom Gutenberg blocks: create-block, InnerBlocks, context and patterns
A custom Gutenberg block is a plugin with a build step. This covers scaffolding one with @wordpress/create-block, what each file in src is for, registering it from PHP, adding sidebar controls, nesting…

A local WordPress dev setup: LocalWP, MailHog, PHPCS
A WordPress local setup that catches mistakes before review does: LocalWP for the site, MailHog so test mail never reaches a real inbox, PHPCS and PHPCBF for the coding standards, and the…

WordPress rewrite rules, permalinks and transients
Every WordPress request goes to index.php, and yet the browser shows /movie/iron-man, a path that does not exist on disk. Rewrite rules are what close that gap, they live in the database…

PHPUnit tests for a WordPress plugin, scaffold to first assertion
wp scaffold plugin-tests generates a working PHPUnit setup for a WordPress plugin in one command, and then the install script falls over on MySQL credentials. This covers the PHPUnit basics, what the…

WordPress VIP Go: repo structure, environments, and local dev
WordPress VIP Go is Automattic’s enterprise hosting platform, and the first thing that catches people out is that a VIP repo does not look like a WordPress install. This covers the directory…

When Cloudflare Sneezed and WordPress Caught a Fatal Error
A Cloudflare outage on June 13 took down wp-admin on a client site that does not use Cloudflare. The cause was a Yoast license check that received a 404-shaped response, treated it…