Why can’t I embed YouTube videos in WordPress?

About a year ago, WordPress added a feature that made it ridiculously easy to embed content from various sites (like YouTube, Slideshare, Vimeo) into WordPress sites.

How to embed media in WordPress in a second

If you want to embed, for example, a YouTube video in a post, all you do is paste the URL of the video into the editor, unlink it and save/publish. See our ultimate guide to embedding HTML and iframes in WordPress on WPGarage for more info on how this works.

The problem is that it doesn’t seem to work 100% of the time. Luckily, there’s usually a reason for this. So if you’re having trouble embedding media in your WordPress site, see if the following tips help you out.

1. Your WordPress site isn’t set to enable embeds of this kind.

Whenever you set up a WordPress site, you have the option to allow embeds or not. Make sure you’ve chosen this option.

  1. Go to Settings > Media.
  2. Under Embeds check the option: “When possible, embed the media content from a URL directly onto the page. For example: links to Flickr and YouTube.”
  3. Save changes.

2. You aren’t using the right link

It’s possible you aren’t using the right link. For example, maybe you copied the link of a channel instead of an individual video.

Here is an example of a URL that won’t work:


Instead, the URL should look something like this:


Lets see it work (all I did was un-hyperlink the above link to get the embedded video below):

Man, it’s so easy I could spit!

3. Extra code is messing things up

Maybe extra code is being added to the WordPress editor without you realizing. Try embedding the link into the HTML editor instead of the Visual one. If you see any extra code aside from the link itself, remove it.

4. The YouTube user isn’t allowing embeddings of their media

When someone uploads a video to YouTube, they can choose whether or not others will be able to embed their video around the web. If they chose not to allow it, no matter what you do, you won’t be able to embed it into your site.

Want to know how to change the embedding settings on one of your YouTube videos? Here’s how:

  1. Make sure you’re logged into YouTube (with your Google account).
  2. Click on the arrow next to your username in the top right-hand corner.
  3. Click on My Videos.
  4. Click Edit info on the video you want to edit.
  5. Scroll down to Embedding and click the arrow next to it in order to see the two options.
  6. Choose whether or not external sites will be able to embed your video.
  7. Click Save Changes.

Anything else?

These are the problems we’ve found that prevent the awesome WordPress embed function from working. Have you found any other issues that don’t allow you to embed using links in WordPress?

  • Xirux Nefer

    Yes, I have a problem with a WP.org installation. Here:

    This is the code I used in HTML view:
    Linking from an image

    Raw link:

    WP link:
    Reportaje sobre TeSo

    In the first case I embed an image that links to the video
    In the second case I use the raw link from the browser
    In the third case I use the WP insert buttons.

    Only the second option shows it, but I have no control on how it is shown (size, centering, etc.).

  • Xirux Nefer

    bah, the code didn’t show in the comment….
    Anyway, what I’m doing it’s explained at the end of my comment…
    I hope you get it.

  • Jennifer

    You may also have to reset the size requirements under media settings. That’s what finally solved my problem!

  • If the Youtube link has a hyphen in the address like the one below it also does not display in wordpress.
    Short of re-uploading onto YouTube to get a new link has anyone found a way to make it work.

  • Your instructions 1 above.
    Go to Settings > Media. FINE. NO PROBLEM
    Under Embeds check the option: “When possible, embed the media content from a URL directly onto the page. SORRY DOESN’T EXIST.

  • Miger

    You can also you a YouTube plugin in the WordPress plugin directory to embed with different policies. I suggest searching:


  • Removed the extra code from around the link in the txt screen, saved draft and viewed; Worked perfect. Been racking my brain with this one for a while. Thanks for the help.

  • h103

    I’m using WP3.8.1. The only options on my Settings>Media admin page are for “Image Sizes” and “Uploading Files,” nothing there that pertains to embedding. Is this how-to no longer valid?