When you embed a YouTube video in WordPress content, it can help to engage your readers, increase time spent on the page, and provide a better experience for users.
There are several ways you can embed videos into content in WordPress. In this step-by-step tutorial, we’ll take you through each method. By the end of the guide, you’ll know how exactly to include YouTube videos in your WordPress posts and pages and how to get them looking and working the way you want.
We’ll start with the simplest method, which involves simply pasting the YouTube video URL into your content.
If you’re using the WordPress block editor, it will automatically detect that you’ve pasted in a video link and will convert it into the appropriate block.
The easiest way to do this is by selecting the entire URL in your browser address bar and pressing CTRL+C on a PC or Command+C on a Mac (or by right-clicking/clicking with 2 fingers to bring up the contextual menu and selecting “Copy”.
You can also scroll down to just under the video and click the “Share” link. A pop-up will appear with the URL and links for sharing on social media. There’s also an “Embed” option but you can ignore this for now.
Handy tip: if you use the link from the YouTube Share pop-up, you can choose to start your embedded YouTube video at a particular timestamp.
Just pause the video at the place you want it to start before you click the Share link to bring up a pop-up with sharing options. Then tick the box next to “Start at 2:18” (or whatever time you paused the video) before you click “COPY” to copy the link. This will add a parameter to the URL to start it at the time you’re paused at.
Once you’ve copied the video URL, it’s simply a case of pasting it into your content. Click where it says “Start writing or type / to choose a block” and press CTRL-P/Command-P or right-click and select “Paste”.
WordPress will detect that you’ve pasted in a YouTube video link and will automatically convert it into a YouTube block.
The second way to embed a YouTube video in a WordPress post is by creating a YouTube block yourself.
This method starts in exactly the same way as the copy-and-paste method: Copy the URL of the video you want to embed from the URL bar in your browser or the YouTube “Share” pop-up.
There are two ways to add a new block to your WordPress content. Choose the one you prefer.
You can either click the + icon, which will bring up a pop-up where you can browse for or search for a block type.
Click the “YouTube” option to create a YouTube block. You may have to search for it if it’s not immediately visible.
Or, if you prefer working completely via your keyboard rather than clicking your mouse or trackpad you can type “/” to bring up a list of common blocks, use your arrow keys to scroll through to the YouTube option and press enter to create the YouTube block.
Click where it says “Enter URL to embed here…” and press CTRL-P/Command-P or right-click and select “Paste” to paste the URL into the YouTube block and click the “Embed” button.
After the video has been embedded, you’ll see how it will look in your content.
You can also use the WordPress video block to embed YouTube videos in your posts and pages. There’s no reason to use this block over the YouTube video block, but if you have an existing self-hosted video or video from another site that you want to change to a YouTube video, you can edit the block to insert the YouTube URL instead.
Copy the YouTube URL from your browser address bar or from the YouTube “Share” pop-up, exactly as the previous two methods started.
Click the + icon and type “video” in the resulting pop-up to find the video block
Click the “Video” option to create a video block. Click the “Insert from URL” option.
Paste the YouTube URL you copied earlier in the field that pops up and press enter. WordPress will create a YouTube block displaying the video.
You can also use this method to embed videos from other sites.
There’s another way to embed YouTube videos into your posts and pages that’s a little more technical but it can be an alternative to try if standard embeds aren’t working.
You also have more control over how your video appears with this method if you’re happy editing code.
But be aware – embedding videos in this way can conflict with your theme and mess up the formatting of your content. So think of it as a last resort after you’ve tried the other ways.
You need more than the video URL to embed a YouTube video in this way. Luckily, YouTube gives you the code you need.
Find the video you want to link on YouTube and click the “Share” link under the video. Click the “Embed” option.
This will bring up a preview of the video and code for embedding it as an iframe. Click “COPY” to copy the code.
Back in your WordPress dashboard, click the + icon to add a new block as in the previous steps.
Search for “Custom HTML” and select the block to add it to your content.
Use CTRL-P/Command-P to paste the code you just copied from WordPress into the block.
If you click the “Preview” option above the code, you should be able to see the embedded video.
You can paste YouTube URLs into widgets just as you can into page and post content.
If you want to embed a YouTube video in the sidebar, footer, or other location of your WordPress site, you can add it as a widget.
Just as with most of the other embed methods, start by finding the video you want to link on YouTube and copying the URL of the video.
Go to Appearance > Widgets in your WordPress dashboard and drag a new Text widget into your sidebar or any other widget area.
Make sure the “Visual” tab of the main content area is selected rather than “Text”. Paste the YouTube video URL in the main content area of the widget.
If the embed works, you should immediately see the video as it will appear on your site.
You can also add a title for the widget if you wish.
Make sure to click the “Save” button at the bottom of the widget to publish your changes. You should now be able to view the video in the sidebar widget area on the front end of your site.
You don’t need to use a plugin to embed YouTube videos into WordPress. However, plugins can offer extra viewing options and advanced features.
Some plugins you might want to try out include:
Embed Plus lets you embed a gallery of YouTube videos from a channel or playlist. You can choose from multiple gallery layouts and optionally play videos in a lightbox. You can also embed live chat and live streams into your WordPress site.
There are also more advanced options for displaying and playing YouTube videos including showing or hiding player controls, auto-playing videos, turning on or off captions by default, looping videos, and more.
Price: Free for basic version, Premium plugin from $39.99
The Smash Balloon YouTube plugin makes it easy to create beautifully styled YouTube feeds on your website with features including video search, custom pause and end actions, live streaming, and more.
The plugin includes a Gutenberg block so it’s quick to add YouTube feeds directly from the block editor, and there are a variety of feed layouts and customization options to style feeds any way you want.
Price: $49
Get Smash Balloon YouTube Feeds
YotoWP is a video gallery plugin for WordPress that makes it easy to create beautiful galleries for your YouTube videos with options to import multiple videos by playlist or channel.
The plugin is designed for fast loading and easy customization with a choice of 5 thumbnail styles, video light box popups, video gallery layout with big player, thumbnail hover animations, and more.
Price: Free for basic features, $21 for premium features
Get YotoWP Video Gallery Plugin
If you embed several videos into one of your WordPress content pages, it can significantly slow down the page. This is because each video loads external scripts from YouTube.
The WP YouTube Lyte plugin allows you to “lazy load” YouTube videos so that the script is only loaded when the video is played. This can significantly reduce your page load time and speed up your site.
Price: Free
PublishPress Blocks is not really a video embed plugin. It’s a collection of Gutenberg blocks that you can add to the basic WordPress blocks for extra styling and formatting options for various content types.
The plugin includes blocks for buttons, images, forms, tables, and other content elements as well as video blocks.
You can use the Advanced Video block to embed videos from YouTube and Vimeo. You can choose to play videos in a light box, adjust the video size, and change color settings, and play button style and size.
Price: $99 including the PublishPress theme and all the PublishPress plugins for scheduling content, and managing authors, permissions, and revisions. This bundle is ideal for improving the content publication process for larger sites with multiple authors.
All the first three methods have the same result (creating a YouTube block with the embedded video), so you can use whichever method you find easier. (I recommend the basic cut-and-paste method!)
If you want more advanced play controls or display options, try one of the video embed plugins for extra video embed features.
Yes. WordPress supports video embeds from sites including:
– Amazon
– VideoPress
– YouTube
– Vimeo
– Animoto
– DailyMotion
– TikTok
– TED
– WordPress.tv
– Cloudup
– Flickr
– Tumblr
If you paste a video link from any of these sites into your content or use the video block, WordPress will convert it into the appropriate block and embed the video automatically.
The YouTube block includes an optional caption. Just click under the video after it embeds and type over the “Write caption…” prompt.
If you click the alignment icon in the toolbar above the YouTube block, you can adjust the alignment of the video, which also adjusts its size. Aligning the video left or right will make it smaller.
However, to have more control over the size of the video, you’ll need to use a plugin, use the iframe embed method and edit the code to adjust the video size, or use custom CSS to adjust the size.
These instructions are for using the Gutenberg block editor, but you can use the same cut-and-paste method to embed YouTube videos in the WordPress classic editor.
Just copy and paste the URL into the editor in visual view and you should see a preview of your video.
If your video embed isn’t working there could be a couple of reasons why.
First, check the link you’ve copied by pasting it into a browser. You can only embed standard YouTube videos with the WordPress YouTube block and you can’t link to YouTube channels.
You can also try copying the link from the YouTube Share pop-up if it is different from the link in the browser address bar.
If you’re sure the link is correct, try using the iframe video embed method above. Sometimes this method works when the standard video embeds fail.
Sometimes video embeds don’t work because the creator has disabled embedding or the privacy settings don’t allow sharing. If this is the case, you’ll have to find a different video.
If you can’t embed any videos, a plugin might be disabling the embedding feature of WordPress. Try disabling your plugins one by one to see if any of them is causing the issue.
While you can upload videos directly to WordPress and host them on your own site, we wouldn’t recommend it in most cases.
Videos take up a lot of disk space and bandwidth. YouTube is optimized for videos so they load fast and there shouldn’t be too much buffering as long as your connection speed is reasonable.
If you host videos on your own site, they might be slow to load, stop playing after a few seconds, or not work at all on some devices. Videos also eat up your server resources and too many requests to your site could slow everything down. Sites hosting a lot of videos usually need to pay large hosting bills for extra service space and bandwidth.
I hope this guide helped you to embed a YouTube video on your site. It’s pretty easy to do in WordPress! Any other questions or tips? Go ahead and leave them in the comments!
Trying to figure out how to start an online course so that you can share…
Considering using LearnDash to create online course content with WordPress? LearnDash is a popular WordPress…
WordPress XML files see a lot of use for me as a content creator, and…
If you’re looking for a way to deliver an online course, complete with all the…
Search Engine Optimization (SEO) is crucial for any website that wants to maximize its traffic…
Kinsta is a notable brand in the WordPress hosting space. The standout aspect of the…