The Davis-Allman Business Development Blog – Alpha: life is an ongoing experiment

How to Add a Video to a WordPress Blog

Here’s a quick step-by-step guide on how to add a YouTube video to a WordPress blog. This will work equally well for a WordPress page or post.

It is easy to add a link to a video, but, if you do your site’s visitors will end up leaving your site to see the video and they may not return. It is much better to show the video in your WordPress post or page by embedding it.

Update: Timing is everything! With the release of WordPress 3.6 Video (and audio) embedding is now built-in. So you’ll only need to follow the steps below if you’ve not updated to WordPress 3.6. Read about the WordPress 3.6 update here.

You can also use this tip to insert a video into any website where you can edit the site’s HTML – though that’s beyond the scope of this post.

Here’s how it’s done.

Before we start

The example I’ve gone through below uses a video on YouTube. You can achieve similar results with videos on Vimeo. If you want to publish one of your own videos you’ll need to upload it to YouTube (or Vimeo) first. For that you’ll need to create an account.

Get The Embedded Video Code From YouTube

First find a suitable video on YouTube…

Click on ‘Share’. If there isn’t a share link the user doesn’t want to have their videos shared, so you’ll have to find another video that is appropriate to your post’s needs.

Click on Embed. Again if the embed link isn’t available, then this user doesn’t mind you linking to the video page, but they don’t want you to embed their video in your site so, you’ll need to look for another suitable video.

Select the correct size. This will depend on your WordPress theme. For the theme I was using the main content area is 625 pixels wide. Either select a size that is smaller, or specify the exact size you need. I clicked on ‘Custom size’ and typed in the width. YouTube automatically works out how high the video needs to be. If you pick a size that is wider than your theme allows, depending on the theme, the video may run-over your sidebar content, or it may get truncated vertically, leaving things like the video controls on the screen while it is playing. So, it pays to select the correct size.

Do yourself and visitors a favor and uncheck all the above options. Especially the ‘Show suggested videos when the video finishes’. Otherwise they may become distracted by further videos and either run out of time or forget why they were visiting your site – I know that has happened when I’ve been following videos.

Highlight and copy the embedded video code. If you don’t know how to do this, have a look at our How to copy and paste text tutorial.

Adding the Video to your WordPress blog

Begin by creating a new post or page, or edit an existing post or page. If you don’t know how to create a new page or blog post, you’ll need to check some of the many on-line resources on getting started with WordPress. Or, you can contact me to arrange an one-on-one online WordPress training session.

Select the ‘Text’ view. This can be a bit scary if you are not used to seeing the HTML that’s hiding behind your posts. But it will be fine.

Find the point where you want to insert your video and paste in the code you just copied from YouTube. Again, if you are not sure how to do this, have a look at our How to copy and paste text tutorial.

Note. You will not be able to watch the video until you update or publish your post. In the WordPress visual editor the video will appear as a plain pale yellow box, and in the preview mode there will just be a blank space.

The Final Result

Something to Remember

If you are using someone else’s video they may delete it, or change their mind about sharing it at anytime. So it pays to check every now and then to ensure that the video is still available.

Copyright

I’m often asked if embedding a someone else’s video or picture in your own posts is a copyright violation. The answer is no, provided they’ve given permission. On YouTube they give their permission by ticking a box when they upload their video. This allows people to embed it. If you can’t see the embed option, the owner hasn’t given permission for it to be used. If they have allowed embedding, as long as you use the links provided by YouTube, there is no problem with copyright. Where people get in to trouble is when they make a copy of a video or photograph without permission and/or pass the content off as their own. That is stealing – don’t do it.

In the above example you’ll see I’ve been very clear to state that this is a video we found on YouTube, and the video links back to the original creator’s YouTube video page.