for WordPress Version 3.1 or later.
The easiest way to add video to a WordPress post or page is to do it via YouTube.
YouTube takes care of hosting the video files and managing file formats – whatever format your video is in, YouTube will convert it so that it can be viewed over the internet without concern about different video players. Also, if your video becomes a big hit and everyone wants to see it,YouTube will manage all of the bandwidth requirements for large numbers of hits on your video.
So, let’s assume that you have a YouTube account, you’ve made your video and you’ve uploaded it to YouTube. (Here’s some YouTube video help if you need it to get started).
These instructions apply to WordPress 3.1 or later. If you have WordPress 3.0 or an earlier version, see the previous version of How to Easily Add Video to a WordPress Post or Page.
Here’s all you need to do to add that video to your page or post:-
1. Copy your YouTube video URL
Go to YouTube and get the URL of your video (not the embed code). You can just grab the URL from the top of the browser when you view the video (it will look something like this – http://www.youtube.com/watch?v=ECnAT_NV3GY).
2. Paste the YouTube URL into the Post Editing Box
When you are editing the page or post where you want to place the video, position your cursor where you want the video to appear. For the video to be added automatically, it must be on its own separate line, with nothing before or after it. Press “Enter” to start a new line.
Using the Paste icon , paste the YouTube URL straight into the post edit box.
You’ll need to make sure that the URL is not hyperlinked (clickable when viewing the post). If it is, click on the “break link” icon to remove the hyperlink.
3. Troubleshooting or Placing the Video Inline
If the video does not appear when you view the page, or if you want to place your video “inline” (ie not on its own line), centre it or use some other formatting, you can use the
[embed^ shortcode around your YouTube URL, like this:-
This will force the video to be embedded, rather than depending on it to happen automatically (which can be hampered if there are formatting tags in the background which prevent your video URL from being recognised properly).
4. Changing the Size of the Video
If you find the video appears too large for your website, you can control the size of the video by using the
shortcode with dimensions, like this:-
[embed width="480" height="320"] http://www.youtube.com/watch?v=ECnAT_NV3GY[/embed]
You can specify both width and height or just one (the other will be proportional).
Note that this constrains the maximum size of the video; it will not increase a smaller sized video.
And that’s it
Here’s my sample video.
Hosting your own Video
If you want to show video without the YouTube logo and host it yourself, it’s not quite such a simple process, but it is still quite easy, with the right additions to WordPress. Watch out for more about that.