How to Embed a Video in WordPress (YouTube, Vimeo or Your Own)

Filmstrip embedded into a WordPress page-shaped open book

To embed a YouTube or Vimeo video in WordPress, copy the video’s URL, paste it on its own line in the block editor and WordPress turns it into a video player automatically. To show a video file you host yourself, use the Video block instead.

Below are the methods for each situation, which video sites WordPress supports, and what to do when an embed does not appear.

Method 1: Paste the URL (YouTube, Vimeo and Other Services)

Copy the video’s address from its page or its Share button.

Click on Copy the Video URL Option
Click on Copy the Video URL Option

Open your post or page in the editor and paste the URL on an empty line, with nothing else on that line.

Loading the URL
Loading the URL

WordPress recognizes the address and creates an embed block with a preview of the video.

Embed the Video
Embed the Video

Save or update the post and check the video on the live page.

Example of Video Embed in WordPress
Example of Video Embed in WordPress

You can also add a YouTube, Vimeo or general Embed block from the block inserter and paste the URL into it. That gives the same result and lets you add a caption.

Which Video Sites Work?

This uses a standard called oEmbed. WordPress supports a fixed list of services, including YouTube, Vimeo, TikTok, Dailymotion, VideoPress, TED and others; see the official list of supported embeds. Facebook and Instagram embeds need a separate plugin because those platforms require an access token.

Method 2: Upload Your Own Video With the Video Block

If you have the video file itself, add a Video block.

Inserting the Video Block
Inserting the Video Block

Choose Upload to add the file to your Media Library, Media Library to reuse an existing file, or Insert from URL to point to a video file such as an MP4 stored elsewhere. Insert from URL needs a direct link to the file; for a YouTube or Vimeo page, use Method 1.

Options While Embeding Video's in WordPress
Options While Embedding Videos in WordPress

In the block settings you can choose autoplay, loop, muted, a poster image and preload options. Browsers only allow autoplay when the video is muted.

Self-hosting has real costs: video files are large, use your hosting storage and bandwidth, and play poorly on slow connections unless your host or a CDN streams them efficiently. For most sites, hosting on YouTube or Vimeo and embedding is the better choice.

Method 3: Embed in the Classic Editor

If your site uses the Classic Editor plugin, paste the video URL on its own line in the Visual tab, and WordPress embeds it the same way.

Pasted the Video URL
Pasted the Video URL
WordPress Detected URL
WordPress Detected URL

To set a size, wrap the URL in the </code> shortcode:</p> <!-- /wp:paragraph --> <!-- wp:code --> <pre class="wp-block-code"><code>https://www.youtube.com/watch?v=VIDEO_ID

Method 4: Add a Video to a Sidebar or Widget Area

Go to Appearance > Widgets, open the widget area, click + and add a Video block for a file, or a YouTube or Embed block for a hosted video. On block themes, edit the template part in Appearance > Editor instead.

The Widgets Section
The Widgets Section
Click on the + Button
Click on the + Button

Method 5: Use a Video Player Plugin

Plugins such as Presto Player add a custom player, chapters, branding and email capture on top of YouTube, Vimeo or self-hosted videos. They are worth it for courses and marketing pages; for an ordinary blog post, the built-in blocks are enough.

Searching for the Presto Player Plugin
Searching for the Presto Player Plugin

Keep Video Embeds From Slowing the Page

Each YouTube embed loads the YouTube player and its scripts, even if nobody presses play. With several videos on one page, that adds noticeable weight. To keep pages fast:

  • Use one or two embeds per page, and put the most important one first.
  • Consider a “click to load” option, which shows a preview image and only loads the player when a visitor clicks. Many performance plugins and some video plugins offer this.
  • Use YouTube’s privacy-enhanced mode (youtube-nocookie.com) if you need to reduce tracking cookies; some privacy plugins switch embeds to it automatically.

For more ways to keep pages light, see my WordPress speed guide.

If the Video Does Not Appear

ProblemWhat to check
The URL shows as a plain linkPut it on its own line with no other text, and make sure it is a supported service.
“Sorry, this content could not be embedded”The video is private, deleted, or the owner disabled embedding. Check the video’s sharing settings on YouTube or Vimeo.
It works in the editor but not on the live pageA caching, privacy or consent plugin may be blocking the embed until visitors accept cookies. Clear the cache and test in a private window.
An uploaded video will not uploadThe file is larger than your upload limit. Compress the video or raise the limit with your host.

Related Posts

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to our Monthly Newsletter

Get monthly updates of WordPress tips, tricks, and tutorials in your email.

Thanks. You have successfully subscribed.