Write Missing SEO Titles and Meta Descriptions in Yoast SEO with AI
Find the posts with no Yoast SEO title, meta description, or focus keyphrase, and get them written from the post itself, a batch at a time, with your approval.
Prerequisites
A connected site running Yoast SEO 28.6 or newer (the free version works) on WordPress 6.9 or newer. Take a backup before a large batch. Yoast only offers these abilities on a production site (WordPress environment type production, the default); a staging or local copy set to another environment type shows none.
I use Yoast SEO on my WordPress site. Find my published posts that are missing SEO data in Yoast and fill the gaps. Count the gaps with one read-only database query on Yoast's indexable table: SELECT object_id, breadcrumb_title, title IS NULL AS no_title, description IS NULL AS no_description, primary_focus_keyword IS NULL AS no_keyphrase FROM {prefix}yoast_indexable WHERE object_type='post' AND object_sub_type='post' AND post_status='publish' AND (title IS NULL OR description IS NULL OR primary_focus_keyword IS NULL) ORDER BY object_last_modified DESC. If it returns nothing on a site with published posts, tell me Yoast may not have indexed them yet and that Yoast SEO, Tools, SEO data optimization fixes it. Tell me the total, then work on the first 10 only, and read just those 10 with the yoast-seo/get-post-seo-data ability by post ID. For each post, read its content and propose: an SEO title that ends with %%sep%% %%sitename%% and stays under 60 characters once rendered, a meta description between 120 and 155 characters that says what the reader gets, and one focus keyphrase someone would really search for. Base all three only on what the post says: no invented claims, no clickbait, and never change a field that already has a custom value. Show me the batch as a table with post, proposed title, proposed description with its character count, and keyphrase, and wait for my approval. Save only what I approve, one post at a time, with WP-CLI: post meta update [post ID] with the keys _yoast_wpseo_title, _yoast_wpseo_metadesc and _yoast_wpseo_focuskw, each with --force because Yoast's keys are protected. Do not use yoast-seo/update-post-seo-data for this, because it does not accept titles or descriptions. After saving, read the first post back with get-post-seo-data, then fetch its live URL and confirm the title and meta description appear in the page source. If the page still shows the old value, purge the page cache or add a query string to the URL, and do not rewrite anything. Tell me how many posts remain and ask before starting the next batch.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Write Missing SEO Titles and Meta Descriptions in Yoast SEO with AI” recipe from the WPVibe cookbook on my connected site.
Yoast SEO puts a snippet editor under every post, and on most sites it sits empty. Nobody decided to skip it. The post got written, publish got clicked, and Google got the default: the post title, a separator, the site name, and whatever sentence the search engine picked as a description. Going back means opening each post, finding the panel, and writing two lines, a hundred times.
The AI reads each post’s Yoast data with the plugin’s own ability, which tells a custom value apart from Yoast’s default template, so it only fills real gaps. For each post it reads the content, drafts an SEO title, a meta description, and a focus keyphrase from what the post actually says, and shows you a table before it saves anything. It writes into the same Yoast fields the snippet editor uses, then reads the post back and checks the live page source.
Paste the prompt and work in batches of ten, so you read what goes out under your name. Yoast’s update ability covers robots, canonical, cornerstone, and schema settings but not titles or descriptions, so the AI saves those as Yoast’s own post fields, which show on the next page load. One thing to know: the SEO score dot in the posts list does not change until someone opens the post and clicks Update, because Yoast calculates it in the editor. To rewrite titles that already exist across a whole category, use the general version of this recipe.
Outcome
Every post you approved has a Yoast SEO title, meta description, and focus keyphrase, and you have seen them in the live page source.