You can make existing content AI-ready without switching to Sanity. WordPress, Payload CMS and Supabase can all reach the same state: structured, rich in metadata and exposed through an API that LLMs and RAG pipelines can use. The work is separating content from presentation, typing every field and adding embeddings. None of it requires a platform swap.

Key takeaways

  • WordPress can reach Level 2-3 structured content using Gutenberg blocks, custom fields, and the REST API, without a platform switch.
  • Payload CMS already stores rich text as typed JSON (Lexical), which puts most Payload sites close to AI-ready by default.
  • Supabase's pgvector extension lets you store content and embeddings in the same Postgres database, giving you a RAG backend without adding a separate vector service.
  • An AI abstraction layer that syncs, normalizes, and embeds content can sit on top of any CMS. This avoids a full migration.

Updated 5 November 2026: sources added, experience claims checked against our project record, summary added.

What "AI-Ready Content" Actually Means

First, a definition. "AI-ready content" gets used as a buzzword, but it has a specific meaning: your content meets three criteria:

  1. Machine-parseable structure -- AI models can reliably extract meaning from your content without guessing at context
  2. Rich metadata -- Every piece of content carries enough semantic information that an AI can understand relationships, intent, and context
  3. API accessibility -- Content is available through programmatic interfaces that AI agents, RAG pipelines, and LLM tool-calling can consume

That's it. Notice what's missing: a specific vendor. These are architectural patterns, not product features.

The Content Intelligence Spectrum

Think of content AI-readiness as a spectrum:

Level Description Example
0 Blob of HTML WordPress post with inline styles and mixed media
1 Separated concerns Clean HTML with structured data markup
2 Field-level structure Content broken into typed fields (title, summary, body, author)
3 Semantic relationships Content with explicit references, taxonomies, and entity links
4 AI-native Content with embeddings, semantic annotations, and machine-readable intent

Sanity's structured content model pushes you towards Level 3-4 by default. Any CMS can reach Level 3, and Level 4 too with extra infrastructure.

Why Sanity Gets All the Attention

Let's give credit where it's due. Sanity's approach to structured content works well for AI use cases:

  • Portable Text stores rich text as a JSON AST rather than HTML, making it easy to parse programmatically
  • GROQ queries return exactly the shape of data you need, which maps well to LLM context windows
  • Content Lake treats content as a graph of typed documents with explicit references
  • Their AI SDK integrations, introduced in 2025, allow direct tool-calling from LLMs into content queries

Sanity's evangelists don't mention this: these advantages are architectural patterns, not proprietary magic. You can build every one of them in your existing stack. But it takes deliberate design.

The real question isn't "should I switch to Sanity?" It's "how do I apply structured content principles in the stack I already run?"

Structuring Content for AI in WordPress

WordPress powers roughly 43% of all websites. If you run it, you have more options than you might think.

Step 1: Stop Using the Classic Editor for Everything

The Gutenberg block editor already stores content as structured blocks, each with a type, attributes and content. That sits closer to Sanity's Portable Text than most people realise.

{
  "blockName": "core/paragraph",
  "attrs": {},
  "innerBlocks": [],
  "innerHTML": "<p>This is structured content, not just HTML.</p>",
  "innerContent": ["<p>This is structured content, not just HTML.</p>"]
}

The block data is stored as serialized comments in post_content, but you can parse it programmatically:

$blocks = parse_blocks($post->post_content);
$structured = array_map(function($block) {
    return [
        'type' => $block['blockName'],
        'attributes' => $block['attrs'],
        'content' => strip_tags($block['innerHTML']),
    ];
}, array_filter($blocks, fn($b) => $b['blockName'] !== null));

Step 2: Invest in Custom Fields and Taxonomies

Advanced Custom Fields (ACF) or Meta Box give you Level 2-3 content structure, if you plan for it. Don't just add fields. Design a content model.

// Register a structured content type for AI consumption
register_post_type('knowledge_article', [
    'supports' => ['title', 'custom-fields'],
    '[show_in_rest' => true, // Critical for API access](https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/)
]);

// Define semantic fields
acf_add_local_field_group([
    'title' => 'AI-Ready Content Fields',
    'fields' => [
        ['key' => 'summary', 'label' => 'Summary', 'type' => 'textarea'],
        ['key' => 'key_concepts', 'label' => 'Key Concepts', 'type' => 'taxonomy', 'taxonomy' => 'concept'],
        ['key' => 'content_intent', 'label' => 'Content Intent', 'type' => 'select', 'choices' => [
            'informational' => 'Informational',
            'transactional' => 'Transactional',
            'navigational' => 'Navigational',
        ]],
        ['key' => 'related_entities', 'label' => 'Related Entities', 'type' => 'relationship'],
    ],
]);

Step 3: Expose Everything Through the REST API

WordPress REST API is your bridge to AI. Make sure custom fields are exposed:

add_action('rest_api_init', function() {
    register_rest_field('knowledge_article', 'ai_metadata', [
        'get_callback' => function($post) {
            return [
                'summary' => get_field('summary', $post['id']),
                'concepts' => wp_get_post_terms($post['id'], 'concept', ['fields' => 'names']),
                'intent' => get_field('content_intent', $post['id']),
                'related' => get_field('related_entities', $post['id']),
                'structured_blocks' => parse_blocks(get_post_field('post_content', $post['id'])),
            ];
        },
    ]);
});

If you run WordPress as a headless CMS with a Next.js or Astro frontend, this REST API becomes the main interface for your AI.

Step 4: Add JSON-LD Structured Data

Teams often overlook this for AI readiness, but it matters. Google's AI Overviews and other AI crawlers consume JSON-LD. Yoast SEO and RankMath generate basic schema. For AI readiness, output detailed structured data:

{
  ["@context": "https://schema.org"](https://schema.org/TechArticle),
  "@type": "TechArticle",
  "headline": "Make Your Content AI-Ready",
  "abstract": "How to structure existing CMS content for AI consumption",
  "about": [
    {"@type": "Thing", "name": "Content Management"},
    {"@type": "Thing", "name": "Artificial Intelligence"}
  ],
  "mentions": [
    {"@type": "SoftwareApplication", "name": "WordPress"},
    {"@type": "SoftwareApplication", "name": "Payload CMS"}
  ]
}

Payload CMS: You're Closer Than You Think

If you're already on Payload CMS, you're probably at Level 2-3 without much extra work. Its collection-based architecture and typed fields make it structured by design.

Why Payload Is Already AI-Friendly

Payload stores content as typed JSON documents in MongoDB or Postgres. Every field has a defined type. Relationships are explicit. This is what AI tools need.

// Payload collection that's already AI-ready
const Articles: CollectionConfig = {
  slug: 'articles',
  fields: [
    { name: 'title', type: 'text', required: true },
    { name: 'summary', type: 'textarea' },
    { name: 'body', type: 'richText' }, // Stored as Slate/Lexical JSON
    { name: 'topics', type: 'relationship', relationTo: 'topics', hasMany: true },
    { name: 'contentType', type: 'select', options: ['guide', 'tutorial', 'reference'] },
  ],
};

Payload's rich text editor (Lexical in v3.x) stores content as a JSON AST, like Sanity's Portable Text. You already have structured content.

Adding AI-Specific Fields to Payload

The gap between Payload and full AI-readiness is mostly about metadata. Add these fields to your collections:

const aiFields: Field[] = [
  {
    name: 'aiMetadata',
    type: 'group',
    fields: [
      { name: 'embedding', type: 'json', admin: { hidden: true } },
      { name: 'extractedEntities', type: 'json', admin: { readOnly: true } },
      { name: 'semanticSummary', type: 'textarea', admin: { readOnly: true } },
      { name: 'contentHash', type: 'text', admin: { hidden: true } },
    ],
  },
];

Then use Payload's hooks to auto-generate embeddings on save:

const generateEmbeddingHook: CollectionAfterChangeHook = async ({ doc, operation }) => {
  if (operation === 'create' || operation === 'update') {
    const textContent = extractTextFromLexical(doc.body);
    const embedding = await openai.embeddings.create({
      model: 'text-embedding-3-small',
      input: `${doc.title}\n${doc.summary}\n${textContent}`,
    });
    
    await payload.update({
      collection: 'articles',
      id: doc.id,
      data: {
        aiMetadata: {
          ...doc.aiMetadata,
          embedding: embedding.data[0].embedding,
          contentHash: hashContent(textContent),
        },
      },
    });
  }
};

Sanity's AI features work much the same way. Here, you build it yourself. For teams building on Payload with Next.js, this pattern fits into the existing deployment pipeline.

Supabase as an AI-Ready Content Layer

Supabase is a database platform, not a CMS. More teams now use it as their content backend, especially with its pgvector extension for embeddings.

The pgvector Advantage

Supabase has supported pgvector for several years, and the extension has matured considerably. You can store content and vector embeddings in the same database:

-- Enable the extension
create extension if not exists vector;

-- Create a content table with embedding support
create table content (
  id uuid default gen_random_uuid() primary key,
  title text not null,
  body text not null,
  metadata jsonb default '{}',
  content_type text not null,
  embedding vector(1536), -- OpenAI text-embedding-3-small dimension
  created_at timestamptz default now(),
  updated_at timestamptz default now()
);

-- Create an index for similarity search
create index on content using ivfflat (embedding vector_cosine_ops)
  with (lists = 100);

Building a Content API for AI Agents

Supabase's auto-generated REST API plus Edge Functions give you everything you need:

// Supabase Edge Function for AI content retrieval
import { createClient } from '@supabase/supabase-js';

Deno.serve(async (req) => {
  const { query, limit = 5 } = await req.json();
  const supabase = createClient(Deno.env.get('SUPABASE_URL')!, Deno.env.get('SUPABASE_KEY')!);
  
  // Generate embedding for the query
  const embeddingResponse = await fetch('https://api.openai.com/v1/embeddings', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${Deno.env.get('OPENAI_API_KEY')}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      model: 'text-embedding-3-small',
      input: query,
    }),
  });
  
  const { data } = await embeddingResponse.json();
  const queryEmbedding = data[0].embedding;
  
  // Semantic search using pgvector
  const { data: results } = await supabase.rpc('match_content', {
    query_embedding: queryEmbedding,
    match_threshold: 0.7,
    match_count: limit,
  });
  
  return new Response(JSON.stringify(results), {
    headers: { 'Content-Type': 'application/json' },
  });
});

The Postgres function for similarity matching:

create or replace function match_content(
  query_embedding vector(1536),
  match_threshold float,
  match_count int
) returns table (
  id uuid,
  title text,
  body text,
  metadata jsonb,
  similarity float
) language sql stable as $$
  select
    content.id,
    content.title,
    content.body,
    content.metadata,
    1 - (content.embedding <=> query_embedding) as similarity
  from content
  where 1 - (content.embedding <=> query_embedding) > match_threshold
  order by content.embedding <=> query_embedding
  limit match_count;
$$;

This gives you a working RAG (Retrieval-Augmented Generation) backend with no CMS migration. Your content lives in Supabase, your AI can query it semantically, and your Astro or Next.js frontend can consume it through the same API.

The Universal Principles of AI-Ready Content

No matter your CMS, these principles apply:

1. Separate Content from Presentation

This is the single biggest thing you can do. If your content is tangled up with HTML, CSS classes and layout concerns, AI can't reliably parse it. Store content as data and render it as HTML in the presentation layer.

2. Type Everything

Every field should have a clear type. Don't use generic "text" fields for structured data. A date should be stored as a date. A reference should be a reference, not a slug string pasted into a text field.

3. Make Relationships Explicit

If Article A references Product B, that should be a typed relationship, not a mention in the body text. AI tools need to traverse your content graph, and implied links give them nothing to follow.

4. Add Semantic Metadata

Go beyond basic SEO metadata. Include:

  • Content intent (informational, transactional, navigational)
  • Audience segment
  • Confidence/freshness indicators
  • Entity annotations
  • Topic classifications beyond basic categories

5. Version and Timestamp Everything

AI systems need to know how fresh content is. Include created_at, updated_at and, ideally, a valid_until or review_date field. Stale content in a RAG pipeline leads to hallucinations.

Building an AI Abstraction Layer

Here's a pattern that works well: instead of migrating your CMS, add an AI abstraction layer on top of it.

[WordPress/Payload/Supabase] → [Content Sync] → [AI Layer (pgvector/Pinecone)] → [AI Consumers]

The AI layer:

  1. Syncs content from your CMS via webhooks or polling
  2. Normalizes it into a consistent structure regardless of source
  3. Generates embeddings and stores them alongside the normalized content
  4. Exposes an AI-optimized API for RAG, tool-calling, and semantic search
// Simplified content sync pipeline
interface NormalizedContent {
  id: string;
  source: 'wordpress' | 'payload' | 'supabase';
  sourceId: string;
  title: string;
  body: string; // Plain text, stripped of markup
  structuredBody: object; // JSON AST if available
  metadata: {
    type: string;
    intent: string;
    topics: string[];
    entities: string[];
    createdAt: string;
    updatedAt: string;
  };
  embedding?: number[];
}

async function syncContent(source: ContentSource): Promise<void> {
  const rawContent = await source.fetchAll();
  
  for (const item of rawContent) {
    const normalized = source.normalize(item);
    const embedding = await generateEmbedding(
      `${normalized.title}\n${normalized.body}`
    );
    
    await aiLayer.upsert({
      ...normalized,
      embedding,
    });
  }
}

The advantage is that your editors keep the CMS they know: no retraining, no migration, no downtime. The AI layer sits alongside your existing stack.

Vector Embeddings Without a Full Migration

Let's talk costs and tooling, since this matters for real-world decisions:

Embedding Provider Model Relative Cost Dimensions Notes
OpenAI text-embedding-3-small Low 1536 Best cost/quality ratio
OpenAI text-embedding-3-large Higher 3072 Higher accuracy
Cohere embed-v4 Moderate 1024 Good multilingual support
Voyage AI voyage-3 Moderate 1024 Strong for code content
Local (Ollama) nomic-embed-text Free (self-hosted) 768 Privacy-first option

A typical content site with 5,000 articles averaging 1,500 words each comes to roughly 7.5 million tokens to embed. With a low-cost embedding model, the one-time cost is tiny, and even weekly re-embedding stays cheap.

Vector Storage Options

Solution Free Tier Pricing Best For
Supabase pgvector Free tier available Paid plans from $25/mo Teams already on Supabase
Pinecone Limited free tier Usage-based paid plans Production RAG at scale
Qdrant Cloud Limited free tier Usage-based paid plans Advanced filtering needs
Weaviate Cloud Limited free tier Usage-based paid plans Multi-modal content
Turbopuffer N/A Pay-per-query Cost-sensitive projects

If you're already running Supabase, pgvector is the obvious choice. No extra service, no extra billing, no extra point of failure.

Real-World Architecture Patterns

Here are two architecture patterns worth considering:

Pattern 1: WordPress + Supabase AI Layer

Consider a media company with 50,000+ WordPress posts:

  1. WordPress webhook fires on post save/update
  2. A Supabase Edge Function receives the webhook
  3. Content is fetched via WP REST API, normalized, and embedded
  4. Stored in Supabase with pgvector
  5. AI chatbot on the Next.js frontend queries Supabase for semantic search
  6. Results are passed to an LLM as context for answer generation

Total extra infrastructure cost: roughly $25/month for the Supabase Pro tier.

Pattern 2: Payload CMS with Built-in AI

Consider a SaaS documentation site built on Payload v3:

  1. Payload hooks generate embeddings on every document save
  2. Embeddings stored in a vector column in the same Postgres database Payload uses
  3. Custom Payload endpoint for semantic search
  4. AI docs assistant powered by the same database
  5. No external vector store needed

Total extra infrastructure cost: $0 beyond the embedding API calls, usually just pennies per month.

Both patterns typically take a few weeks to build, far less than the months a full CMS migration can take. For an example of these pieces in a full rebuild rather than a bolt-on layer, see our SleepDr migration from WordPress to Next.js, Payload CMS, and Supabase, which used the same structured-content and Supabase patterns described here. If you're considering this kind of architecture, our pricing tiers cover these types of projects.

FAQ

Do I really need to restructure my content for AI, or is it just hype?

Restructuring isn't hype, though the urgency depends on your use case. If you're building AI features such as chatbots, semantic search or personalisation, structured content is essential. If you're optimising for AI-driven search such as Google's AI Overviews, structured data and clear content hierarchies measurably improve visibility. Pages with solid schema markup and a clear hierarchy also tend to get cited more often in AI-generated answers.

What's the minimum I should do to make WordPress content AI-ready?

The minimum is three steps: use Gutenberg blocks consistently instead of pasting raw HTML, add JSON-LD structured data to every page, and expose custom fields through the REST API. Together these move your content from Level 0-1 to Level 2-3 structure in a few weeks of focused work. You don't need to restructure your entire site overnight.

Can Payload CMS replace Sanity for AI-powered content?

For most use cases, yes. Payload v3 stores rich text as structured JSON via Lexical, supports typed fields and relationships, and runs on Postgres with pgvector. That covers the technical foundation Sanity provides. The main gap is Sanity's managed Content Lake with built-in AI tooling, which Payload doesn't offer natively. If you wire up your own embedding pipeline, which usually takes about a day, Payload gives you equivalent capability.

How much does it cost to add vector embeddings to an existing CMS?

Surprisingly little. For a site with 10,000 articles, the one-time cost of generating embeddings is typically just a few dollars with an efficient embedding model, and ongoing re-embedding of updated content stays cheap. The bigger ongoing cost is usually vector storage, which ranges from free to a modest monthly fee depending on your provider and scale. Supabase's free tier can handle many small-to-medium sites.

Should I use a separate vector database or store embeddings in my existing database?

If you're on Postgres, which both Payload v3 and Supabase use, store embeddings in the same database with pgvector rather than adding a separate service. That is one less service to manage and one less sync pipeline to break. Dedicated vector databases like Pinecone are only worth considering at very large scale or with strict latency needs. For most content sites, pgvector is fast enough, with query times typically in the low tens of milliseconds for collections under a million vectors.

How do I keep AI embeddings in sync with content changes?

Use webhooks. Most modern CMS platforms support them. When content is created or updated, fire a webhook that triggers re-embedding and stores a content hash alongside the vector, so you can skip unchanged content on the next sync. For WordPress, use the save_post action. For Payload, use afterChange hooks. For Supabase, use database triggers or Realtime subscriptions.

What about content in multiple languages? Does this approach still work?

Yes, but choose your embedding model carefully, since not all handle multilingual text equally well. Some providers offer models tuned for cross-lingual retrieval, so check vendor documentation before committing. Your normalisation layer should also store the language code as metadata, so AI consumers can filter results properly. Embed each language version separately rather than concatenating translations.

Is migrating to a headless CMS a prerequisite for AI-ready content?

Not a prerequisite, but it helps a lot. Headless architecture separates content from presentation, which is the foundation of AI readiness. If you're still running a monolithic WordPress theme with content baked into template files, going headless with a Next.js or Astro frontend can improve both AI readiness and frontend performance. It's often worth the investment even before you consider AI use cases. If you want to explore this, reach out to us. It's a core part of what we build for clients.

Key takeaway:

Structured content principles apply to any CMS stack, not just Sanity.