Beginner’s Tip: How to Add a YouTube Video to WordPress

 


There are two basic ways to add a YouTube video to your WordPress site:

  1. By pasting a link to the video page in your Post or Page
  2. 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.

Auto-Embed Settings

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 Pop-Up Chat Plugin

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

 

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 Appointments Plugin

Take, set and manage appointments and client bookings without having to leave WordPress. Appointments+ makes it easy.
Find out more

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.

Tags

Comments (4)

  1. Hi Joe

    For bonus tips of common issues from Edublogs users as to why YouTube video doesn’t work 1) when you use the video URL make sure it isn’t hyperlinked after you’ve pasted it in 2) remain in HTML and change back to Visual editor when you write next post.

    • You might double-check that you’ve check the correct box on the Media Settings page. Also, you might look at your HTML to make sure that the URL isn’t linked to the page (make sure it’s just the URL, not an actual link).

Participate