Title: wp embed cache
Published: February 5, 2018
Last modified: April 13, 2026

---

# 󠀁[wp embed cache <command>](https://developer.wordpress.org/cli/commands/embed-2/cache/)󠁿

Finds, triggers, and deletes oEmbed caches.

## In this article

 * [Examples](https://developer.wordpress.org/cli/commands/embed-2/cache/?output_format=md#examples)
 * [Subcommands](https://developer.wordpress.org/cli/commands/embed-2/cache/?output_format=md#subcommands)

[ Back to top](https://developer.wordpress.org/cli/commands/embed-2/cache/?output_format=md#wp--skip-link--target)

 [ ⌊GitHub⌉ ](https://github.com/wp-cli/embed-command)

 [ View Open Issues (1) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Aembed-cache+sort%3Aupdated-desc+org%3Awp-cli+is%3Aopen)
[ View Closed Issues (0) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Aembed-cache+sort%3Aupdated-desc+org%3Awp-cli+is%3Aclosed)
[Create New Issue](https://github.com/wp-cli/embed-command/issues/new)

### 󠀁[Examples](https://developer.wordpress.org/cli/commands/embed-2/cache/?output_format=md#examples)󠁿

    ```
    # Find cache post ID for a given URL.
    $ wp embed cache find https://www.youtube.com/watch?v=dQw4w9WgXcQ --width=500
    123

    # Clear cache for a post.
    $ wp embed cache clear 123
    Success: Cleared oEmbed cache.

    # Triggers cache for a post.
    $ wp embed cache trigger 456
    Success: Caching triggered!
    ```

### 󠀁[Subcommands](https://developer.wordpress.org/cli/commands/embed-2/cache/?output_format=md#subcommands)󠁿

| Name | Description | 
| [wp embed cache clear](https://developer.wordpress.org/cli/commands/embed-2/cache/clear/) |

Deletes all oEmbed caches for a given post.

  | 
| [wp embed cache find](https://developer.wordpress.org/cli/commands/embed-2/cache/find/) |

Finds an oEmbed cache post ID for a given URL.

  | 
| [wp embed cache trigger](https://developer.wordpress.org/cli/commands/embed-2/cache/trigger/) |

Triggers the caching of all oEmbed results for a given post.

  |

 _Command documentation is regenerated at every release. To add or update an example,
please submit a pull request against the corresponding part of the codebase._