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

---

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

Inspects oEmbed providers, clears embed cache, and more.

## In this article

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

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

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

 [ View Open Issues (0) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Aembed+sort%3Aupdated-desc+org%3Awp-cli+is%3Aopen)
[ View Closed Issues (5) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Aembed+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/?output_format=md#examples)󠁿

    ```
    # Get embed HTML for a given URL.
    $ wp embed fetch https://www.youtube.com/watch?v=dQw4w9WgXcQ
    &lt;iframe width="525" height="295" src="https://www.youtube.com/embed/dQw4w9WgXcQ?feature=oembed" ...

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

    # List format,endpoint fields of available providers.
    $ wp embed provider list
    +------------------------------+-----------------------------------------+
    | format                       | endpoint                                |
    +------------------------------+-----------------------------------------+
    | #https?://youtu\.be/.*#i     | https://www.youtube.com/oembed          |
    | #https?://flic\.kr/.*#i      | https://www.flickr.com/services/oembed/ |
    | #https?://wordpress\.tv/.*#i | https://wordpress.tv/oembed/            |

    # List id,regex,priority fields of available handlers.
    $ wp embed handler list --fields=priority,id
    +----------+-------------------+
    | priority | id                |
    +----------+-------------------+
    | 10       | youtube_embed_url |
    | 9999     | audio             |
    | 9999     | video             |
    +----------+-------------------+
    ```

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

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

Finds, triggers, and deletes oEmbed caches.

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

Attempts to convert a URL into embed HTML.

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

Retrieves embed handlers.

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

Retrieves oEmbed providers.

  |

 _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._