How to embed YouTube videos to a Wordpress blog
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:
- Login to WordPress admin
- Go to Options >> Writing *
- Uncheck box “Users should use the visual rich editor by default” *
- Go to Write >> Write Post
- Paste the YouTube code in the write box
- 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.
8 Bits From The Past
How Crazy Are You?
Be Careful Who You Link To And What You Write About






February 15th, 2007 at 3:58 am
thank you, I have added this to my delicious, will use as a reference when I add youtube videos to my blog
February 15th, 2007 at 6:46 am
You’re welcome. And welcome to my blog, Steve
May 29th, 2007 at 3:48 am
Thank you. This is very usefull.
June 13th, 2007 at 10:30 am
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.
June 13th, 2007 at 10:35 am
You’re all very welcome. Glad this article is helping others with embedding YouTube videos.
October 27th, 2007 at 6:18 am
Hm somehow I have nothing like this option in Wordpress MU
October 28th, 2007 at 12:07 am
Thank you for posting this ;).
October 28th, 2007 at 12:22 am
Chris, did you try just pasting the code from YouTube?
You’re welcome, Sandra.
April 13th, 2008 at 8:36 pm
Thanks for the great tips on embedding youtube videos in wp blogs.
April 13th, 2008 at 10:53 pm
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.
August 11th, 2008 at 12:30 pm
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.
August 11th, 2008 at 8:54 pm
@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.
August 12th, 2008 at 12:14 am
@Vivien
Thanks for the reply. Yeah I did do that and it still didn’t work, hence why I’m so stuck