Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • C#
  • Asp.Net Core
  • SQL
  • Windows
  • WordPress
  • AI
  • JavaScript
  • CSS
  • MORE
    • HTML
    • Ajax
    • Git
    • Docker
    • Kubernetes
    • Photoshop
    • Visual Studio

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • C#
  • Asp.Net Core
  • SQL
  • Windows
  • WordPress
  • AI
  • JavaScript
  • CSS
  • MORE
    • HTML
    • Ajax
    • Git
    • Docker
    • Kubernetes
    • Photoshop
    • Visual Studio
Wordpress

WordPress: Fix oEmbed Previews Breaking for One Specific Domain

- 27.11.26 - ErcanOPAK

📝 WordPress: Fix oEmbed Previews Breaking for One Specific Domain

WordPress’s oEmbed system keeps a per-provider allowlist of host patterns in wp_oembed_add_provider() and a small built-in set of ‘rich’ providers (YouTube, Twitter/X, Vimeo and similar). A link from a provider that isn’t on that list falls back to a generic link-preview fetch instead of the provider’s real embed — and that fallback can itself get cached as a failed, empty result in the postmeta oEmbed cache the first time it’s tried, so even adding the provider later doesn’t fix posts that already tried and failed once.

🔎 The Problem

// pasting a link from a provider WP doesn't recognize
// as rich, inside a Classic Editor post, on its own line:
https://clips.example-streaming-service.com/abc123

// First load after pasting: WP tries oEmbed, provider unknown,
// caches an empty/failed result in post meta key '_oembed_abc123...'
// Adding the provider via wp_oembed_add_provider() later:
// still shows a bare link on THIS post - stale cache wins

✅ Fix: Register the Provider and Clear the Stale Cache

  • Register the missing provider explicitly with wp_oembed_add_provider( '#https?://clips\.example-streaming-service\.com/.*#i', 'https://clips.example-streaming-service.com/oembed', true ) hooked to init, using the regex form for a pattern-based match.
  • Delete the stale cached postmeta for affected posts (keys starting with _oembed_) so WordPress re-attempts the fetch instead of continuing to serve the cached failure from before the provider was registered.
  • For a quick single-post fix, re-save the post after registering the provider and clearing its cache — WordPress re-evaluates oEmbeds for a post whenever it’s saved, not only on first publish.

🚨 Why This Is Dangerous

  • A content author can reasonably conclude the embed ‘just doesn’t work on this site’ and manually paste a plain link or a static screenshot instead, permanently losing the richer embed even after the actual provider-support bug gets fixed.

A failed oEmbed fetch doesn’t just fail once — it tells WordPress to keep failing in exactly the same way until someone clears the memory of it.

— WordPress Admin

Related posts:

WordPress: Fix a Block Editor Pattern That Reverts to Default Styling Every Time You Reinsert It Fro...

WordPress: Fix a Block Editor Pattern That Reverts to Default Styling Every Time You Reinsert It Fro...

WordPress: Stop 'Briefly Unavailable for Scheduled Maintenance' From Getting Stuck Forever

WordPress: Stop 'Briefly Unavailable for Scheduled Maintenance' From Getting Stuck Forever

WordPress: Run Custom SQL Queries with $wpdb Object

WordPress: Run Custom SQL Queries with $wpdb Object

Views: 6
Found this useful? Share it
XLinkedInWhatsApp

Post navigation

Windows 11: Fix a Pinned Start Menu Icon Reverting to Generic
CSS: Fix a Backdrop Filter Not Rendering Behind a Fixed Header

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Read

  1. 01How to make theater mode the default for Youtube 1,079 views
  2. 02How to add default value for Entity Framework migrations for DateTime and Bool 997 views
  3. 03Get the User Name and Domain Name from an Email Address in SQL 996 views
  4. 04Get the First and Last Word from a String or Sentence in SQL 873 views
  5. 05How to select distinct rows in a datatable in C# 868 views
  6. 06How to enable, disable and check if Service Broker is enabled on a database in SQL Server 671 views
  7. 07Add Constraint to SQL Table to ensure email contains @ 629 views
  8. 08Average of all values in a column that are not zero in SQL 584 views
  9. 09How to use Map Mode for Vertical Scroll Mode in Visual Studio 561 views
Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
Back to top
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com