When I tried embedding Adobe Photoshop CS3 video from YouTube in my previous posts it didn’t work. It messed up my blog, and nothing was appearing after that post. So I started searching on Google on how to ow to embed YouTube videos to a WordPress blog. I found several tutorials and tips, still had troubles with some of them, but after a few attempts I got it right.

As it turned out, you cannot just paste the embed code to the editor window when TinyMCE WYSIWYG editor is on, nor can you paste the embed code to the HTML source by clicking on HTML icon, you need to turn off the WYSIWYG. So to spare you the same frustration I had and if you’re struggling to get your YouTube video embedded to your blog, here’s what you need to do:

  1. Login to WordPress admin
  2. Go to Options >> Writing *
  3. Uncheck box “Users should use the visual rich editor by default” *
  4. Go to Write >> Write Post
  5. Paste the YouTube code in the write box
  6. Publish

* if you logged in as admin you might need to turn off rich text editing under Users >> Your profile.

Also, keep in mind that the <embed> tag is deprecated in XHTML 1.0, so instead of embedding YouTube’s code as it is suggested on their site (their instructions are given on the left side from the actual video), use the following format:

<object type=”application/x-shockwave-flash” width=”425″ height=”350″ data=”http://www.youtube.com/url”><param name=”movie” value=”http://www.youtube.com/url” /></object>

Make sure to replace the video URL with the one you’re using in your blog.

There’s also a quick way of adding YouTube or other videos to your blog – using Video Quicktags plugin.

Recent Bits
Related Bits
8 Bits From The Past
How Crazy Are You?
Be Careful Who You Link To And What You Write About
New cool features of Adobe Photoshop CS 3
WordPress 2.1 – new and useful features
The Best WordPress Plugin Ever
8 Entertaining Bits for Kids & Grown Ups
New Invaluable WordPress Plugin – WP Ajax Edit Comments
Comment Bits

14 Insightful Bits in response to “How to embed YouTube videos to a WordPress blog”

  1. thank you, I have added this to my delicious, will use as a reference when I add youtube videos to my blog

  2. ibit

    You’re welcome. And welcome to my blog, Steve :-)

  3. Thank you. This is very usefull.

  4. Thank you very much for this article. I had a hard time trying to insert YouTube videos on my WP website, now the plugin and tips were really useful.

  5. Vivien

    You’re all very welcome. Glad this article is helping others with embedding YouTube videos.

  6. Hm somehow I have nothing like this option in WordPress MU

  7. Thank you for posting this ;).

  8. Vivien

    Chris, did you try just pasting the code from YouTube?

    You’re welcome, Sandra.

  9. Thanks for the great tips on embedding youtube videos in wp blogs.

  10. You’re very welcome, UrWar. Have you upgraded to the latest version of WordPress 2.5? It has a new way of embedding video and other media links.

  11. fox

    Hi

    I’ve been having huge amounts of trouble with this all day, I’ve tried EVERYTHING and can’t get it to work. I did everything you said above but when I click ‘save’ the code just disappears. I tried copying/pasting Youtube’s own embed code but the same thing happens. I can’t try plugins as I don’t have the wp/plugins folder needed to upload them (I have a blog on Baywords which uses WordPress). Am I doing something wrong? I cannot figure out what’s going wrong.

  12. @fox
    Did you copy&paste Youtube’s code after switching to HTML tab in the Write section, not the Visual? As long as you copy the code in HTML, everything should work. Good luck with it.

  13. fox

    @Vivien

    Thanks for the reply. Yeah I did do that and it still didn’t work, hence why I’m so stuck

  1. Pixellore - Design. Gadgets. Life. » How To Add YouTube Videos to Wordpress

    [...] code into the WYSIWYG editor. You’ll have to turn off. After searching google I followed this process and voila it [...]

Selected Bits

PopularBits

RecommendedBits

FavouriteBits

PersonalBits

Hi, I'm Vivien. Thanks for visiting my Inspiration Bit. I often find myself scouring the internet looking for either answers to many questions I have or websites that inspire me, sites that I can learn from. On what topics you might ask — any topics that interest me, anything from web design to typography and art, from blogging to entrepreneurship, from programming to open source.
read more…
When I'm not blogging, I design web sites, teach, play with my daughter and try to balance family, work, friends and a somewhat active social life on