◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Build → Embed YouTube Video
How to embed a YouTube video into a WordPress webpage
Embedding a YouTube video into your WordPress page can enhance your content, making it more engaging and visually appealing. Videos provide a dynamic way to convey information, showcase products, or share tutorials, improving user experience and retention.
Whether using the block editor or classic editor, the process is simple and can be completed in just a few steps. We’ll explore various methods to embed YouTube videos seamlessly, from built-in features to top plugins for added functionality.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
Benefits of embedding video on a webpage
Embedding videos on your WordPress page offers numerous advantages that can enhance user experience and engagement.
- Videos capture visitor attention more effectively than text alone. With visual and auditory elements, they simplify complex topics.
- Videos can improve your website’s SEO. Search engines favor content that keeps users engaged, potentially boosting your rankings.
- Embedding videos can lead to higher conversion rates. Well-placed videos can encourage actions like newsletter sign-ups or purchases.
- Videos can be easily shared on social media, increasing reach and driving more traffic to your website.
- Videos allow you to showcase your brand personality, fostering loyalty and trust through storytelling, tutorials, or testimonials.
How to embed a YouTube video using the block editor
Embedding a YouTube video using the block editor is straightforward.
- Navigate to the page or post where you want to add the video. Click the ‘+’ icon to add a new block.
- In the block search bar, type ‘YouTube’ to locate the YouTube block, or find it under the ‘Embeds’ category.
- Go to YouTube and find the video. Click ‘Share’ beneath the video, then select ‘Copy’ to grab the video’s URL.
- Return to your WordPress editor and paste the URL into the YouTube block. The editor will fetch the video details.
- Adjust the alignment by selecting the block and using the alignment options in the toolbar.
- Preview your post to ensure the video displays correctly. Once satisfied, hit ‘Publish’ or ‘Update’.
How to embed a YouTube video using the classic editor
Embedding a YouTube video using the classic editor is a simple process.
- Navigate to YouTube and find the video. Click ‘Share’ below the video, then select ‘Embed’ to generate an HTML code snippet.
- Copy the provided embed code. Head to your WordPress dashboard and create or edit a post or page.
- Ensure you are in the classic editor. Switch from the ‘Visual’ tab to the ‘Text’ tab to enter HTML code directly.
- Place your cursor where you want the video to appear and paste the embed code.
- Switch back to the ‘Visual’ tab to preview the video. If everything appears correct, publish or update your post or page.
- Visit the public view of your page to ensure the video is embedded correctly and functions as intended.
Top 3 YouTube embed plugins
Here are three top YouTube embed plugins to enhance your WordPress experience:
1. Embed Plus for YouTube
Embed Plus for YouTube offers customization options such as lazy loading with a facade mode to enhance site performance, deferment of JavaScript execution, and compatibility with the Gutenberg block editor. The plugin also emphasizes privacy compliance, providing features like YouTube no-cookie embeds and GDPR consent messages.
Key strengths:
- Supports embedding of various YouTube content types, including galleries and live streams.
- Performance enhancements through lazy loading and deferred JavaScript.
- Privacy-focused features to assist with GDPR compliance.
- User-friendly integration with WordPress’s Gutenberg editor.
2. WP YouTube Lyte
WP YouTube Lyte is a lightweight WordPress plugin designed to improve page load times by inserting “lazy-loaded” YouTube videos. Instead of loading the full YouTube player, it inserts a clickable preview, reducing the initial load on your site.
This approach enhances performance, especially on pages with multiple videos. The plugin is straightforward to configure and supports responsive video embeds.
Key strengths:
- Improves site performance with lazy loading of video content.
- Simplifies embedding with easy-to-use settings.
- Supports responsive design for various screen sizes.
3. Smash Balloon Foods for YouTube
Smash Balloon Feeds for YouTube allows you to showcase videos from channels, playlists, or even specific search terms. The plugin offers multiple layout options, such as grid, gallery, list, or carousel, and includes features like live streaming feeds, custom pause and end actions, and smart loading of YouTube players to optimize page speed.
It also integrates seamlessly with popular GDPR consent plugins to ensure compliance.
Key strengths:
- Offers diverse feed display options, including channels and playlists.
- Provides multiple layout choices for tailored presentation.
- Optimizes performance with smart loading techniques.
- Ensures GDPR compliance through integration with consent plugins.
How to embed a YouTube video in a sidebar widget
Embedding a YouTube video in a sidebar widget on your WordPress site is straightforward.
- Navigate to the YouTube video you want to embed. Click ‘Share’ beneath the video and select ‘Embed’ to generate the HTML code.
- Copy the embed code, which usually starts with <iframe> and includes the video URL, width, and height attributes.
- Log in to your WordPress dashboard, go to ‘Appearance,’ then click on ‘Widgets.’
- Choose the sidebar widget area where you want to add the video. Drag a ‘Custom HTML’ widget into your preferred sidebar location.
- Paste the embed code into the ‘Custom HTML’ widget text area. Add a title if desired, then click ‘Save.’
- Visit your website to ensure the video appears correctly in the sidebar.
Embedding a video file directly to WordPress
Embedding a video file directly into your WordPress page may seem appealing, but it’s generally not recommended.
- Uploading video files directly can consume significant storage space and bandwidth, leading to slower load times and impacting user experience.
- Managing and hosting video content on your server complicates maintenance and backup processes.
Instead, set up a YouTube account. YouTube provides a robust platform for hosting videos, allowing easy upload, management, and sharing without straining your website’s resources. YouTube’s optimized video player ensures fast load times and smooth playback. Embed videos by copying the embed code or link from YouTube and pasting it into your WordPress editor.
Utilizing YouTube enhances your website’s performance and opens additional avenues for audience engagement. YouTube’s vast community can drive more traffic to your website.
Upgrade your WordPress experience
Integrating a YouTube video into your WordPress page can significantly boost user engagement and offer valuable content for your audience. Utilizing rich media not only enhances the visual appeal of your site but also effectively communicates your message.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy. Liquid Web’s WordPress hosting options configure business-class servers and support plans specifically for WordPress websites.
Don’t want to deal with server management and maintenance? Our fully managed WordPress hosting is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
You can avoid site speed problems when you’re with Nexcess Fully Managed WordPress or Liquid Web’s suite of WordPress hosting solutions.
Additional resources
How to build a WordPress site →
A complete beginner’s guide that covers 9 key steps to a successful launch
WordPress excerpt length: What it is, how to change it →
Learn how to customize WordPress excerpt length to improve readability and enhance user experience.
How to use WordPress Gutenberg blocks →
A complete beginner’s guide to Gutenberg blocks