There are two basic ways to add a YouTube video to your WordPress site:
- By pasting a link to the video page in your Post or Page
- By pasting the video’s embed code in your Post or Page
We’ll go over both below.
1. Pasting a Link
Perhaps the easiest way to add a YouTube video to WordPress is by simply pasting in a link for the video on its own line in the editor.
Before you try pasting your YouTube link into your site, you will want to make sure that you have your media settings properly set up.
In order to do that, go to Settings > Media > Auto-embeds (check box).
Featured Plugin - WordPress Google Maps Plugin
Get YouTube Link
When your settings are correct, you can just get the link to the YouTube video you’d like to embed.
Probably the easiest way to do that is to click the “Share” button under the video itself. This will give you a shortened link to the video.
If for some reason this shortened link doesn’t work for you, you can get the long link by clicking on the “Options” link under the shortened link.
(Note: It is possible to get the link from the address bar of your browser, but YouTube often adds extra information to this link that may make it unusable in WordPress.)
Paste Link in Editor
Once you have your link, you can simply place it on its own line in your text editor wherever you’d like the video to appear.
And here’s the result.
Featured Plugin - WordPress Infinite SEO Plugin
2. Pasting Embed Code
The second option you have is to use YouTube’s embed code. If pasting the link as described above doesn’t work for you (even though it’s supposed to), you may try using the embed code.
Choosing to use the embed code also gives you a few other options that the plain link doesn’t, including changing the size of the video.
Getting the Embed Code
In order to get the embed code, click the “Share” button under the video and then the “Embed” button. You’ll then be able to configure the video’s size and get the embed code.
Paste Embed Code
Once you have your embed code copied, go to the “HTML” tab in your editor and paste the code wherever you’d like the video to show up.
And here again is the result, but in this one I’ve made the video a custom size. By setting the width to 300 px, YouTube automatically set the height for me at 169 px, so the video stays in proportion.
And that’s it — two simple ways of adding a YouTube video to your WordPress site.