Is there a way to search all posts and pages in my WordPress site and find those who have a Youtube video embedded in them?
The reason to do that is I want to disable the wp-embed.min.js but before doing that, I need to confirm there are no posts or pages that embed Youtube videos.
Update
I create a test post and embed a Youtube video in it, and then check the HTML source, and find the following one:
<div class="rll-youtube-player" data-src="https://www.youtube.com/embed/A1iB6ZfB4kI" data-id="A1iB6ZfB4kI" data-query="feature=oembed"></div><noscript><iframe title="How to Use DataNumen Outlook Repair to Recover Corrupt Outlook PST Files" width="500" height="281" src="https://www.youtube.com/embed/A1iB6ZfB4kI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></noscript>
I then use the following query to search in database:
SELECT * FROM `wp_posts` WHERE `post_content` LIKE '%oembed%'
However, the found posts are all not normal posts, i.e., do not have a post_title, and I check post_type and find they are all oembed_cache. Does that mean there are no Youtube embedded in all posts? If yes, then why there are so many oembed_cache posts?
wp:core-embed/youtube
(at least it used to!), so if you search the DB for this string inpost_content
ofwp_posts
, you know if some exist or not.wp_posts
WHEREpost_content
LIKE '%wp:core-embed/youtube%' but cannot find any results. I also use another keyword but find some oembed_cache posts. I have updated my original question.oembed_cache
is used by the block editor. So the presence of entries suggests that at some time, these were embedded (though not clear if still embedded or not).