How to Embed Videos in WordPress (A Comprehensive Guide)

Today I’ll teach you how to embed videos in WordPress.
These days videos have become a crucial part of online content. They not only attract visitors but also significantly improve engagement and increase conversions.
However, embedding videos in WordPress isn’t always as straightforward as it seems.
Let’s dive into the best practices to enhance your WordPress site with videos.
Why You Shouldn’t Upload Videos Directly to Your Hosting Account
While it’s tempting to upload videos directly to your WordPress site, this approach has several drawbacks.
As someone who’s tried different ways to manage video content on many websites, I’ve learned that directly uploading videos to your hosting account isn’t the best idea. Here’s why:
- Size Matters: Videos are usually large files. When I uploaded them directly to my site, they ate up a lot of server space. This led to my website loading slowly, and sometimes it even crashed. Not a great experience for my visitors!
- The Power of Dedicated Hosting: Services like YouTube, Vimeo, Wistia, and VEED are tailored for videos. They handle the heavy data load, so your site runs smoother.
- Viewer Experience: These services optimize videos for different devices and internet speeds. This means your videos load faster and look better, no matter how or where someone watches them.
- Handy Extras: I love the additional features. Things like automatic backups, easy sharing and embedding options, basic analytics, SEO tools, and control over privacy settings and collaboration are super useful.
- Control & Collaboration: You get more control over who sees your videos and how they interact with them.
The solution? Embedding videos.
Method 1: Using the WordPress Block Editor

The WordPress Block Editor is a simple and efficient way to embed videos from third-party platforms like YouTube. Here’s how to do it:
- Access the WordPress Dashboard: Log in and select the post for embedding the video.
- Add the Video Block: Click the plus button and search for the YouTube block.
- Embed the Video: Copy the URL of the desired YouTube video, paste it into the block, and click ‘Embed’.
Preview the post to ensure the video displays correctly and then publish or update your post.
Method 2: Adding an Iframe

For a more customized embedding, iframes are your go-to option:
- Get the Iframe Code: On YouTube, click ‘Share’ and select ‘Embed’ to obtain the iframe code.
- Insert the Iframe in WordPress: In your post, use the Custom HTML block to paste the iframe code.
- Preview and Publish: Switch to preview mode to see the embedded video, then publish or update the post.

Method 3: Using Video Embedding Plugins
For those who seek more functionality and customization, video embedding plugins are ideal. Here are two recommendations:
- Video Pack: Ideal for custom thumbnails and responsive videos, but limited in terms of third-party video source compatibility.
- HTML5 Video Player: User-friendly with built-in blocks and shortcode generator, suitable for embedding videos from platforms like YouTube, Vimeo, and Amazon S3.
Embedding Videos in a sidebar
To add a video to your WordPress sidebar:
- Navigate to Widgets: From the WordPress dashboard, go to Appearance > Customize > Widgets.
- Add the Video Widget: Select the desired sidebar area, add the video widget, and insert the video URL.
Once you’ve previewed the video in the sidebar, save and publish your changes.
Conclusion
Embedding videos in WordPress can significantly enhance your site’s user experience. Whether you choose the block editor, iframes, or video embedding plugins, each method offers unique benefits. Experiment with these techniques to find out which one suits your needs the best.