How to embed a video
Learn how to embed YouTube, Vimeo, and other videos into your WordPress pages and posts without slowing down your site.
Adding video to your pages makes them more engaging. The best approach is to host your video on YouTube or Vimeo and embed it into WordPress — this keeps your site fast because the video loads from a separate video platform, not from your own hosting. This guide shows you how.
Quick summary
Copy the video URL from YouTube or Vimeo. In your WordPress page or post, add a YouTube or Vimeo block (using the + button), paste the URL, and press Enter. The video embeds and is ready to play. Don't upload video files directly to WordPress — it's slow and uses up your hosting storage.
What you'll need
Beginner 2–5 minutes- A page or post open for editing. See how to edit a page if needed.
- A video already uploaded to YouTube or Vimeo, with its URL copied.
Don't upload video files directly to WordPress
WordPress can technically accept video file uploads, but this is a bad idea. Video files are very large and will fill up your hosting storage quickly, slow down your site, and may exceed your host's file size limits. Always host video on YouTube or Vimeo and embed the link.
Embed a YouTube video
Go to YouTube and find your video. Click the Share button below the video, then click Copy to copy the short share link (like https://youtu.be/abc123). Or copy the full URL from your browser's address bar — both work.
In the WordPress editor, click the + button where you want the video. Type youtube in the search field and click the YouTube block.
Paste the YouTube URL into the input field that appears and press Enter (or click Embed). The video loads in the editor as a preview.
Preview the page to confirm the video plays correctly before publishing.
Embed a Vimeo video
The process is identical to YouTube.
Go to Vimeo and open your video. Click the Share icon and copy the video link, or copy the URL from your browser's address bar.
In WordPress, click + and add a Vimeo block. Type vimeo in the block picker search.
Paste the Vimeo URL and press Enter. The video embeds.
Use the generic Embed block for other platforms
WordPress supports embedding from many platforms beyond YouTube and Vimeo — including TikTok, Twitter/X, Instagram, Spotify, and more. If you don't see a dedicated block for the platform you want:
Click + and search for "Embed" to add the generic Embed block.
Paste the URL of the content you want to embed and press Enter. WordPress will attempt to create the embed automatically.
Not every platform supports embedding in WordPress. If the embed doesn't work, you may need to use the platform's own embed code — see below.
Using an embed code (iframe) from another platform
Some services give you an "embed code" — a snippet of HTML you paste into your site. To add it:
Copy the embed code from the platform (look for a "Share" or "Embed" button).
In the WordPress editor, add a Custom HTML block. Click +, search for "Custom HTML," and add the block.
Paste the embed code into the Custom HTML block. The video or content will appear when you preview or publish the page.
Custom HTML needs care
Custom HTML blocks render exactly what you paste. If you paste the wrong code, it can break the layout of the page. If you're unsure, ask your project lead before adding embed code you aren't familiar with.
Controlling the video layout
After embedding a video, you can change its alignment in the toolbar:
| Option | What it does |
|---|---|
| Center | Centers the video in the content column (default) |
| Wide width | Stretches the video wider than the content column |
| Full width | Makes the video span edge to edge |
For most articles and blog posts, centered works best. For landing pages, wide or full-width can look more impactful.
What about video in the background of a section?
For a video playing as a background (like a silent hero banner), that's handled through your theme's design settings or a page builder, not the standard Video or YouTube block. Ask your project lead to set that up.
Common questions
Related guides
- Working with blocks
- The most useful blocks, explained
- How to add images to a page or post
- Using video on your website
- How to edit a page
Need a hand?
Learn more
How to add images to a page or post
Step-by-step instructions for adding, positioning, and captioning images in WordPress pages and posts using the block editor.
Undo mistakes with revisions
Learn how to use WordPress revisions to view the history of a page or post and restore any earlier version — so mistakes are never permanent.