meta-writer is a WordPress plugin that drafts an SEO title and a meta description for each post from the post’s own text, and holds them as suggestions until an editor accepts them. It is for operators with an archive too large to describe by hand. Licence MIT. Version v0.1.0, released 18 November 2026.
It was written from scratch from an idea, as one of the utilities described on the engineering blog. It has not run on a live site.
Search results show a title and a short description for every page. When a post has no description of its own, the SEO plugin falls back to the first words of the body. Those are often a dateline, an image caption, a shortcode remnant or a sentence cut in half. When the title field is empty, the post title is used, which may be too long or too vague.
Writing both fields by hand works for ten posts and fails for an archive of thousands. A single template sentence repeated across many pages reads as duplicate, thin content. Without a tool, an operator leaves the fields empty, writes a one-off script that overwrites manual values, or pastes model output into the database with no length check and no review. Pages with an empty body, such as template-driven pages, have nothing to generate from at all.
Runner pages through posts with an ID cursor, never an offset, and hands each to Generator. Input reads the title, manual excerpt and body. Shortcodes are stripped by pattern and never run, and the body is cut to a budget at a sentence or word. Nothing else is sent: no author, comments or custom fields.
The call goes through llm-json-php with a strict two-property JSON schema, or through a callable your site supplies on the meta_writer_caller filter. Validator normalises both strings, measures them in characters a reader sees and shortens at a sentence or word when too long. A string that is too short, empty, identical to the title or in the wrong script gets one more call with a note saying what was wrong, then fails. Flags such as trimmed, duplicate and unsupported_detail tell the reviewer where to look but never reject.
The targets are adapters. The README names the SEO plugins it writes to: Yoast SEO, Rank Math, SEOPress and All in One SEO (experimental), plus the plugin’s own fallback fields when none is active. Each adapter writes only the post meta keys that plugin documents, and never another plugin’s tables.
Provenance records each write with the value, a SHA-256, the previous value, the user and the time. A field counts as the plugin’s own only while it is byte-equal to that record. One character changed by a person makes it theirs for good.
wp meta-writer generate --limit=20 # dry run, nothing called or written
wp meta-writer generate --limit=20 --run # spend calls, within the daily cap
Suggestions live in a {prefix}meta_writer_suggestions table. Rejected, failed, superseded and stale rows are purged after 90 days.
--run (or the confirmation after the admin dry run) nothing is called or written.wp meta-writer kill on, or by the constant META_WRITER_DISABLED, which the screen cannot undo. Review still works.An independent review of the build PR fixed these before the merge.
The review also fixed the post box, where an accept result was stored and never shown.
No issues are open on the repo. Test status: this is v0.1.0. 78 PHPUnit tests with 548 assertions pass on PHP 8.3, including four database tests against a throwaway MySQL 8.0, with PHPStan level 8 and phpcs clean. WordPress and model calls are tested against stubs and mocks. CI has not yet run on GitHub, and it has no production mileage.
It needs PHP 8.1 or later with mbstring, and WordPress 6.4 or later. The model library is on GitHub, not Packagist, so add both as VCS repositories, or use the release zip, which bundles it.
{
"repositories": [
{"type": "vcs", "url": "https://github.com/IndianOpinion/llm-json-php"},
{"type": "vcs", "url": "https://github.com/IndianOpinion/meta-writer"}
],
"require": {"indianopinion/meta-writer": "^0.1"}
}