Guides › Frameworks & CMS
How to add Open Graph tags in WordPress
WordPress core doesn't output Open Graph tags. Use an SEO plugin:
- Yoast SEO: SEO › Settings › Site features › Open Graph data (on by default). Per post: Yoast box › Social tab › Social image/title/description. Site default image: Settings › Site basics.
- Rank Math: per post › Social tab. Defaults under Titles & Meta.
Pitfalls
- Two plugins (an SEO plugin plus Jetpack or a theme) can output duplicate og tags. Disable one. The previewer flags duplicates.
- Page-caching plugins keep serving old tags, so purge after editing.
- Featured images under 200 px are ignored by Facebook.
Verify
Deploy, then run the live URL through the OG previewer. It fetches the page like a social crawler (no JavaScript), so tags added only on the client side won't show up. That matches what Facebook, LinkedIn and X see.
Preview your link now