WordPress Social Preview Check — Test OG Tags Before Sharing
Table of Contents
WordPress generates Open Graph tags through SEO plugins — Yoast SEO, RankMath, or All in One SEO are the most common. When those plugins are configured correctly, every post and page gets proper OG tags automatically. When they are not, you end up with missing social images, wrong descriptions, or no OG tags at all.
Before sharing any WordPress page or post, running a quick OG tag check confirms the preview will look right — and tells you exactly what to fix if it does not.
How WordPress Generates OG Tags
Vanilla WordPress without an SEO plugin generates very basic meta tags. The title tag comes from the post title. The meta description is often empty. There are no og: tags at all by default.
SEO plugins extend this by adding a full set of OG tags to every page, using the values you configure in the plugin settings and the per-post settings in the editor sidebar.
Yoast SEO
Yoast adds og:title, og:description, og:image, and og:url for every post and page. The values come from the Yoast sidebar in the editor. It also adds twitter:card tags. Global defaults are set in Yoast > Social > Facebook and Yoast > Social > Twitter.
RankMath
RankMath has a Social tab in the editor sidebar where you can set a custom social title, description, and image for each post. Global defaults are configured in RankMath > Titles & Meta > Post Types.
All in One SEO
AIOSEO adds a Social tab to each post editor with Facebook and Twitter-specific fields. Global social settings are in AIOSEO > Social Networks.
No SEO plugin
If you are not using an SEO plugin, you need to add OG tags manually via a custom plugin, a theme function, or a header injection plugin. This is not recommended — SEO plugins handle edge cases and provide per-post control that manual code does not.
How to Check WordPress OG Tags
The fastest way to verify OG tags on any WordPress page is the HTML paste method.
- Open the WordPress page or post in your browser (the front-end, not the editor)
- Press Ctrl+U (or Cmd+U) to view page source
- Copy the full HTML
- Paste into the OG checker
- Click Check Tags
The results show all OG tags your WordPress installation is generating, plus a recommendations list and rendered preview cards.
What to check for in WordPress specifically
- og:image is set and uses the correct post thumbnail — Yoast and RankMath use the post featured image as og:image by default. If no featured image is set, they fall back to a global default image configured in the plugin settings.
- og:description comes from the custom excerpt or Yoast meta description — if neither is set, it is often pulled from the post body, which may not be ideal
- Multiple og: tags from conflicting plugins — if you have both Yoast and another plugin adding OG tags, you may get duplicate tags. The checker shows all values it found.
Setting OG Tags in Yoast SEO
Yoast SEO is the most common WordPress SEO plugin and has full OG tag support.
Per-post settings
In the WordPress editor, the Yoast sidebar has a Social tab. Click it to see Facebook and Twitter sections where you can set a custom social title, description, and image for that specific post. If left blank, Yoast falls back to the meta description and featured image.
Global default image
If a post has no featured image and no custom Yoast social image, Yoast uses the global default social image. Set this in Yoast > Settings > Sitewide > Social appearance. Upload a 1200x630 image as the global fallback so every page has at least a basic og:image even without a post-specific image.
Enabling Twitter cards
Twitter cards must be enabled in Yoast > Social > Twitter. Check "Add Twitter Card meta data" and set the default card type to "Summary with large image" for full-width Twitter previews.
Testing before publish
Yoast shows a social preview directly in the editor sidebar. It shows what the Facebook and Twitter cards will look like based on your current settings. Check this before publishing to catch problems early — but follow up with a view-source check after publishing to confirm what Yoast actually output.
Common WordPress OG Tag Problems
These are the WordPress-specific OG tag problems that show up most often.
og:image is the wrong image
Yoast uses the featured image as og:image. If the post has no featured image, Yoast uses the global default. If the global default is not set, og:image may be empty or missing. Fix: set a featured image on every post, and configure a global default in Yoast settings.
Duplicate OG tags from multiple plugins
If you have both Yoast and a theme or another plugin adding OG tags, you get duplicates. Platforms use the first tag they find, but duplicates are still a problem. Disable OG tag output in one of the conflicting sources. Most themes have an option to disable built-in OG tags when an SEO plugin is active.
og:image not updating after changing featured image
After changing the featured image, WordPress updates the og:image tag immediately on the next page load. But if you (or someone else) shared the old link, the platform has the old og:image cached. Force a refresh using the platform debug tools.
OG tags missing on archive pages
Yoast and RankMath generate OG tags for individual posts and pages by default. Category, tag, and author archive pages may have different or missing OG tag settings. Check these pages separately if you plan to share archive page links.
Testing Locally with WordPress
If you run WordPress locally (using Local by Flywheel, MAMP, or similar), you can test OG tags before deploying to production.
Open your local WordPress front-end in a browser, view source, copy, and paste into the OG checker. The tags will be present in the HTML just as they will be on the live site. The only limitation is that og:image will point to your localhost URL, which platforms cannot fetch — but that is expected during local development. What you are checking is the tag structure and the content of each tag, not the image accessibility.
After deploying to production, run one final check on the live URL to confirm the og:image points to the correct production CDN URL and is publicly accessible.
Try It Free — No Signup Required
Runs 100% in your browser. No data is collected, stored, or sent anywhere.
Open Free OG Tag CheckerFrequently Asked Questions
I installed Yoast but WordPress is still not showing OG tags. What should I check?
Make sure Yoast is set to output social meta tags. Go to Yoast > Settings > Sitewide and confirm the social media integration is enabled. Also check that no other plugin or theme is outputting a noindex header, which Yoast respects by not outputting full meta tags for noindexed pages.
RankMath is showing the wrong description in the OG checker. Where does the description come from?
RankMath uses the meta description for og:description by default. The meta description comes from the RankMath editor sidebar field. If that field is empty, RankMath auto-generates a description from the post content. To control og:description specifically, go to the Social tab in the RankMath editor sidebar and enter a custom social description for Facebook separately from the meta description.
My WordPress site uses a CDN. Do I need to clear the CDN cache before testing OG tags?
For the HTML paste method, no — you are copying the HTML directly from your browser, which may bypass the CDN depending on how the CDN is configured. For URL-based testing, or before using Facebook's Sharing Debugger, yes — purge the CDN cache for the specific page URL first to make sure the debug tool fetches the current version of your HTML, not a stale cached copy.

