Most WordPress site owners focus on front-end SEO: good headlines, alt tags, maybe Yoast’s green light.

But if you want full visibility — or manage sites for clients — it’s time to level up.

In this guide, we’ll show you how to extract and audit your SEO data directly from your WordPress database, using only the Yoast SEO plugin (free), Internal Link Juicer, and a simple SQL query.


✅ Why This Matters

You can get a complete SEO snapshot of every blog post on your site in seconds:

  • Meta Titles

  • Meta Descriptions

  • Focus Keyphrases

  • Internal Link Keywords

This helps you find:

  • Missing or weak SEO fields

  • Posts with poor keyword targeting

  • Posts that aren’t linked internally

  • Opportunities to improve performance — fast


What You Need


What This Query Does

It pulls every published blog post, along with the most important SEO fields stored in the database — even if you forgot to fill them in.


The SQL Query

SELECT
p.ID,
p.post_title,
CONCAT(‘https://yourwebsite.com/’, p.post_name) AS post_url,
(SELECT meta_value FROM wp_postmeta WHERE post_id = p.ID AND meta_key = ‘_yoast_wpseo_title’) AS meta_title,
(SELECT meta_value FROM wp_postmeta WHERE post_id = p.ID AND meta_key = ‘_yoast_wpseo_metadesc’) AS meta_description,
(SELECT meta_value FROM wp_postmeta WHERE post_id = p.ID AND meta_key = ‘_yoast_wpseo_focuskw’) AS focus_keyphrase,
(SELECT meta_value FROM wp_postmeta WHERE post_id = p.ID AND meta_key = ‘_ailj_keywords’) AS link_juicer_keywords
FROM wp_posts p
WHERE p.post_type = ‘post’
AND p.post_status = ‘publish’
ORDER BY p.post_date DESC;

Note: Replace wp_ with your own table prefix if it’s different.


How to Run It

  1. Log into phpMyAdmin (or use Adminer / your preferred DB tool)

  2. Go to the SQL tab

  3. Paste the query

  4. Hit Go

  5. Export the results to CSV or Excel

Now open it up in Excel or Google Sheets and filter for:

  • Empty or vague meta titles

  • Missing focus keywords

  • Blank internal link keyword fields

  • Repetitive or generic values (like “Blog” or “My Site”)


How to Use This Data

Once you’ve identified gaps:

  • Update meta fields directly in WordPress or via bulk plugins

  • Add strategic internal linking keywords to boost relevance

  • Refine focus keyphrases based on real content intent

  • Track fixes over time and resubmit updated URLs to Google Search Console


Bonus: Automate Internal Linking

Using Internal Link Juicer, you can predefine keywords for each post that should trigger a link — and this query helps you see which posts are missing them.

Pair this with regular blog publishing, and you’ll build a self-healing, interlinked content network Google loves.


Ready to Try This?

If you manage WordPress websites and want to level up your SEO strategy beyond on-page tips, this workflow gives you full visibility and total control — without needing a premium tool.

Need help running this on your site?
Contact us here for technical audits and SEO support.