Template Rules & Page Editor
Instead of manually typing meta tags on hundreds of pages, define Template Rules (seo-mappings) once per ProcessWire template and reserve per-page overrides in the Page SEO Editor for high-value landing pages and editorial tweaks.
Template Rules (seo-mappings)
Section titled “Template Rules (seo-mappings)”Open Setup -> SEO -> Template Rules to view every eligible frontend template, verify whether an embedded SEO field is attached, and edit default metadata patterns.
Click Sync Templates (or run php vendor/bin/wire seo:setup --all-templates) to create default rules for new templates and prune rules for removed templates. Each Template Rule has three tabs:
- General & Templates (
tab_general):title&target_name: Human label and exact ProcessWire template name (for example,page,article,yacht).title_template&description_template: Tokenized strings interpolated byTokenInterpolator. Supported tokens include{title},{headline},{summary},{site_name},{sep},{page.parent.title}, or any scalar field name on the page.image_field: Fallback image (orMedia) field name on the page used for Open Graph, Schema.org, and<image:image>sitemap entries whenog_imageis blank.
- Schema & Social (
tab_schema):schema_type:WebPage,Article,NewsArticle,BlogPosting,Product,Service,Event,FAQPage,AboutPage,ContactPage,CollectionPage,ItemPage, orNone.og_type:website,article,product, orprofile.- Conditional Product Fields (
schema_type=Product):schema_price_field,schema_currency(enriched automatically whenCurrencyis installed),schema_sku_field, andschema_availability. - Conditional Event Fields (
schema_type=Event):schema_event_start_field,schema_event_end_field, andschema_event_location.
- Indexing & Sitemap (
tab_indexing):robots_noindex: Defaultnoindextoggle for matching pages.sitemap_enabled,sitemap_priority(0.1to1.0),sitemap_changefreq(alwaystonever), andsitemap_images.
The 4-Tab Page SEO Editor (./page/?id={id})
Section titled “The 4-Tab Page SEO Editor (./page/?id={id})”Click Edit SEO on any row in Content SEO (or open ./page/?id={id} directly) to edit a page’s embedded @fieldset:seo fields alongside real-time previews and Prev / Next page navigation.
Each page’s embedded SEO field stores:
- General:
meta_title(max 70 chars),meta_keywords(comma-separated focus keywords),meta_description(max 160 chars),canonical_url(InputfieldReactLinksupporting Page picker or Custom URL with query/anchor),robots_noindex, androbots_nofollow. - Social:
og_image(1200x630 with focal point andMedialibrary picker),og_title,og_description,og_type, andtwitter_card. - Schema & Sitemap:
schema_type(or Inherit),sitemap_include(inherit,include,exclude),sitemap_priority, andschema_custom_json. - Advanced:
extra_metakey/value custom<meta>tags (overrides global tags with the same name) and read-only indexedseo_score.
Discovering & Attaching Embedded SEO Fields in PHP
Section titled “Discovering & Attaching Embedded SEO Fields in PHP”Never assume the field is always named 'seo'. Use Seo’s name-agnostic helpers:
<?php
declare(strict_types=1);
namespace ProcessWire;
/** @var Seo $seo */$seo = wire()->seo;
// Discover all FieldtypeEntries fields bound to embeddedBlueprintType = 'seo'$fields = $seo->seoFields();
// Attach (or create) an embedded 'metadata' field on the 'yacht' template$field = $seo->attachSeoFieldToTemplate('yacht', 'metadata');
// Resolve the active SEO field for a specific page$pageSeoField = $seo->resolvePageSeoField($page);Interpreting the 0 to 100 Readiness Score
Section titled “Interpreting the 0 to 100 Readiness Score”SeoScoreAnalyzer computes scores deterministically from the resolved SeoBag:
- Optimal (
80to100): Unique title (30 to 60 chars), unique description (110 to 160 chars), absolute social image, valid JSON-LD, and valid canonical URL with primary focus keyword alignment. - Needs Work (
50to79): Typically caused by relying on global fallback descriptions, short/long titles, missing social share images, or a focus keyword missing from title/description. - Critical (
0to49): Empty title or description, missing/invalid canonical URL, or invalid custom JSON-LD syntax.
On multi-language sites, SeoScoreAnalyzer::findMissingLanguageWarnings($page) also flags pages that have translated content but are missing localized SEO titles or descriptions.