Press "Enter" to skip to content

How to Embed a Youtube Video in WordPress

Embedding Youtube videos in WordPress pages and posts is extremely easy. In the past, you needed to copy the Youtube embed code to insert the iframe into your post. Otherwise, you needed a plugin that would give you a shortcode which you can then enter the Youtube video URL into in order to embed it on your site. Yuck. Those methods were tedious.

With the new Gutenberg editor, there’s a Youtube embed block that allows you to simply paste the Youtube video URL into the block to auto-embed it in your post or page. Even better, you can skip the Youtube embed entirely and paste the video URL into an empty block. WordPress will auto-detect the Youtube domain in the URL and create an embed for you. It really couldn’t be easier.

That’s how you can embed a Youtube video in WordPress without a plugin or shortcode.

Transcript

This is Ben from WPAnswered.com and by the end of this video, you'll know how to embed Youtube videos in WordPress. The very first step is to visit the Posts menu and select the post you'd like to add the video to. This method for embedding Youtube videos works the same way for pages too. Just so you know. Next, you can click into the end of a paragraph and then press the Enter key to create a new block. To choose the Youtube embed block, first click on this plus button over here and you'll see the block selector appear where you can choose what type of content you want to add into your post. Scroll down a little bit and click on the Embed section and you'll see the Youtube option show up right away. And before I click that, I just want you to see that there are all sorts of embed options here for various social sites and you can also always use this basic embed block here for embedding an iframe into your post.

You can also click into the search bar and type out "youtube" to find the Youtube block. And once you click on it, you'll see this box appear where you can paste in the URL which I'll do right now by pressing command+v. And then once the URL is input, you can click the Embed button to embed the video. That works great, but you know what? There's actually an even faster method. For most popular social networks and video sites like Youtube, you can simply paste the URL into an empty block and WordPress will automatically recognize the youtube.com domain and embed the video for you.

That's everything you need to know about embedding Youtube videos in WordPress. And if you learn something new, why not subscribe? I've got a lot more WordPress tutorials on the way, and if you still have questions, please post in the comments section below and I'll see you there.

Ben Sibley
Ben Sibley

After using WordPress for the last 9 years, I've made dozens of websites, designed and developed 20 themes that have been downloaded more than 1.5 million times, and personally helped thousands of WP users with their sites.

Now I'm sharing everything I know to help make WordPress an easier and more rewarding choice for building a website. If you have a question you want answered, submit your question here.