Clearing oEmbed Cache

WordPress uses oEmbed to grab embed code for various embeddable content such as YouTube and Vimeo videos. Sometimes though, the embed code that your WordPress installation receives through oEmbed is damaged. In this case, the only real solution is to clear your oEmbed cache so that WordPress knows to try fetch new embed code.

For this, you’ll need to access your WordPress database using PHPMyAdmin. Please proceed with caution. Make sure you backup your database before following these steps.

When you log into PHPMyAdmin, you should see a list of your database tables. You need to select the Post Meta table. Most of the time this table will be called wp_postmeta, unless you’re using a different table prefix.

Select the Post Meta table.

Select the Post Meta table.

After you’ve selected the table by clicking on its name, you should see a few options at the top of your screen. Click on the Search button.

Search the post meta table

Search the post meta table

You want to find all the oEmbed meta values. So for the field meta_key, choose the operator “LIKE %…%” and enter “_oembed” in the value field. Finally click Go.

Search for oEmbed keys

Search for oEmbed keys

You should see a few entries now. Make sure that non of the meta values are clearly not embed codes. All meta keys should start with the string “_embed_”. Click Check All, then click Delete. On the next screen, confirm the query by clicking Yes.

Select and delete oEmbed keys

Select and delete oEmbed keys

When you view your pages, WordPress will automatically reconnect with the oEmbed server and fetch fresh embed code.