How to Embed a YouTube Video in WordPress (Step-by-Step Guide)

This will bring up a preview of the video and code for embedding it as an iframe. Click “COPY” to copy the code. If the embed works, you should immediately see the video as it will appear on your site.

Inside this article WordPress will detect that you’ve pasted in a YouTube video link and will automatically convert it into a YouTube block. Copy the YouTube URL from your browser address bar or from the YouTube “Share” pop-up, exactly as the previous two methods started.

Step 1: Copy the video URL

Go to Appearance > Widgets in your WordPress dashboard and drag a new Text widget into your sidebar or any other widget area.

Copying YouTube URL

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”.

How to Embed a YouTube Video in WordPress Starting at a Specific Time

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. You need more than the video URL to embed a YouTube video in this way. Luckily, YouTube gives you the code you need.

How to embed YouTube video starting at specific time

Step 2: Paste the URL into your content

You don’t need to use a plugin to embed YouTube videos into WordPress. However, plugins can offer extra viewing options and advanced features.

Pasting YouTube url into WordPRess

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!

WordPress YouTube block

Method 2: Using the YouTube Block

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!)

Step 1: Copy the YouTube video URL

You can also add a title for the widget if you wish.

Step 2: Create a YouTube block

Price: 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. 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.

Adding the WordPress YouTube block

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. The second way to embed a YouTube video in a WordPress post is by creating a YouTube block yourself.

Adding the Youtube block (keyboard method)

Step 3: Paste the YouTube URL

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.
YouTube block alignment
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.

Pasting in YouTube URL

The YouTube block includes an optional caption. Just click under the video after it embeds and type over the “Write caption…” prompt.

YouTube block preview

Method 3: Using the Video Block

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.

Step 1: Copy the YouTube URL

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.

Step 2: Find the WordPress video block

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.

WordPress video block

Step 3: Create a video block

Find the video you want to link on YouTube and click the “Share” link under the video. Click the “Embed” option.

inserting a video from URL

Step 4: Paste in the YouTube video URL

Get YotoWP Video Gallery Plugin Price: Free

Method 4. Embedding a YouTube Video with an iframe

You also have more control over how your video appears with this method if you’re happy editing code. 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. 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.

Step 1: Copy the YouTube embed 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. Visit PublishPress Blocks

Youtube embed option

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.

Copying Youtube embed ifram code

Step 2: Add a custom HTML block to your WordPress post or page

You can also use this method to embed videos from other sites. 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.

Custom HTML block

Step 3: Paste the YouTube embed code

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”.

PAsting in YouTube embed code

Click the “YouTube” option to create a YouTube block. You may have to search for it if it’s not immediately visible.

Preview of embedded video

Method 5: How to Embed a YouTube Video as a WordPress Sidebar Widget

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. 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.

Step 1: Copy the YouTube video URL

Search for “Custom HTML” and select the block to add it to your content.

Step 2: Add a Text widget to your WordPress site

Get Embed Plus for YouTube

Adding text widget to sidebar

Step 3: Paste the video URL in the text widget

If you want more advanced play controls or display options, try one of the video embed plugins for extra video embed features. 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.

embedding YouTube video in sidebar widget

Method 1: Using Cut and Paste to Embed YouTube Videos

Yes. WordPress supports video embeds from sites including:

What the YouTube widget looks like

Method 6: Use a WordPress Video Embed 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. 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.

Embed Plus for YouTube

EmbedPlus for YouTube

Get WP YouTube Lyte There are two ways to add a new block to your WordPress content. Choose the one you prefer. While you can upload videos directly to WordPress and host them on your own site, we wouldn’t recommend it in most cases. 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.

Smash Balloon Feeds for YouTube Pro

Smash Balloon Feeds for YouTube

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. Price: Use CTRL-P/Command-P to paste the code you just copied from WordPress into the block. 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.

YotuWP Easy YouTube Embed

YotuWP video gallery

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. 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. Get Smash Balloon YouTube Feeds 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.

WP YouTube Lyte

If your video embed isn’t working there could be a couple of reasons why. 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. 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. Click the + icon and type “video” in the resulting pop-up to find the video block

PublishPress Blocks Advanced Video Block

PublishPress blocks advanced video block

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. Some plugins you might want to try out include: Price: Free for basic features, for premium features If you click the “Preview” option above the code, you should be able to see the embedded video. 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.

YouTube Video Embeds FAQ

Which method of embedding YouTube videos is best? You can either click the + icon, which will bring up a pop-up where you can browse for or search for a block type.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.
Will these methods work with videos on other sites like Vimeo? Price: Free for basic version, Premium plugin from .99This 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.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.
How can I write a caption?
The plugin includes blocks for buttons, images, forms, tables, and other content elements as well as video blocks.
How can I change the size of an embedded YouTube video in WordPress 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.
How to embed using the classic editor? 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.
Why can’t I embed YouTube videos in WordPress?
After the video has been embedded, you’ll see how it will look in your content.Click the “Video” option to create a video block. Click the “Insert from URL” option.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.Back in your WordPress dashboard, click the + icon to add a new block as in the previous steps.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.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.
Should I upload my own videos to WordPress or YouTube? 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.– Amazon
– VideoPress
– YouTube
– Vimeo
– Animoto
– DailyMotion
– TikTok
– TED
– WordPress.tv
– Cloudup
– Flickr
– TumblrThere 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.

Final Thoughts

You can paste YouTube URLs into widgets just as you can into page and post content.

Posted by WordPress Guru