WordPress
Themes, custom post types, WP-CLI, cron, caching, and database tuning, plus a Gravity Forms recipe.
On this page
This section collects Avunu's WordPress recipes: theme and plugin development patterns, day-to-day operations with WP-CLI, and the tools we use to debug and speed up slow sites. Everything targets current WordPress 6.x and WP-CLI 2.x. PHP snippets note whether they belong in a child theme's functions.php, a site plugin, or a must-use plugin.
Getting Started
The official WordPress Developer Resources and the WP-CLI command reference are the best references for anything not covered here.
Development
Block Styles in Classic Themes — Register selectable block style variations, each with its own stylesheet, from a classic or child theme.
Child Theme File Includes — Keep
functions.phpshort by loading feature files and folders of post type definitions.Custom Post Type Admin — Admin-only post types, with ACF or meta values shown as sortable list columns.
Operations & WP-CLI
WP-CLI Cookbook — Search-replace, bulk deletion, WooCommerce bulk edits, emergency admin access, and core or plugin reinstalls.
WordPress Cron — Disable page-load WP-Cron and run scheduled events from a real server cron job.
wp-config Reference — The constants we set most often for cron, memory, debugging, and Redis object caching.
Debugging & Performance
Debugging Snippets — Safe debug logging, listing a page's scripts and styles, and silencing the zlib
ob_end_flush()notice.Database Optimization Queries — Measure autoloaded options and post meta bloat, then clean up orphaned data.
Docket Cache Configuration — Avunu's baseline
wp-config.phpconstants for the Docket Cache file-based object cache.
Plugins
Gravity Forms — Styling, CSS loading, submission UX, dynamic image choices, and webhook integrations.
This section is in the public domain (CC0 1.0), code samples included. Use it however helps you.