Why is it necessary to learn how to embed videos in WordPress?
At wpDataTables, we already know that engaging elements like videos and tables are often much more effective than a huge block of text on a web page.
While people might simply skip over the text if there is too much of it, they are much more likely to watch a short video from beginning to end.
So how to embed videos in WordPress? It might be a little bit of a technical challenge, but we are here to help you with that. Keep reading to learn more about a WordPress video and embedding videos in WordPress. Nothing is hard to do when you know how to do it right!
How to Embed a YouTube Video in WordPress Using the URL
The easiest way to embed a YouTube video in WordPress is by simply pasting a video URL into the post or a page. You can easily do so with YouTube videos, Vimeo videos, and similar.
It all comes down to a few simple steps:
- Copy the video URL from YouTube.
- From within your WordPress Dashboard, create a new post by clicking Posts, then Add New.
- Give the post a title, and paste in the URL. WordPress will then be able to leverage the OEmbed API to get the Embed HTML needed to display the video.
- See the video immediately within the Editor and post it.
How to Embed Videos in WordPress Blog Posts
Embedding video in WordPress is quite simple thanks to the WordPress’ cool feature called auto-embeds. With it, you can easily embed code for a video from the sites such as YouTube, Vimeo, and other popular hosting sites.
Simply paste the URL into the post editor, ensure that the video URL is not clickable and it is in its own line. WordPress will immediately fetch the embedded code and display the video in the post editor if you are using the visual editor.
Once you do that, you will be able to save the post and see the preview to ensure everything is running smoothly. However, keep in mind that the auto-embedding won’t work with all provides.
Here is the list of the service providers for WordPress auto-embeds:
- Speaker Deck
- WordPress plugin directory
Embed Videos in WordPress from Unsupported Providers
If you want to embed video in WordPress from an unsupported provider, it will not be as simple as from a supported one, but far from it that it’s impossible.
For starters, try to copy the video URL and paste it into your blog post. There is a chance it will work even if your provider isn’t on the list above.
If it does not work, try and find the code provided for you to use on your blog or simply look for the share or embed option on the provider’s website. If none of that is working, check out some of the most popular WordPress plugins to embed a video.
Why Not Host Your Own Video?
You might have asked yourself why not host your own videos instead of embedding. The truth is, embedding is a better option for a number of reasons.
First of all, if you don’t know how to embed YouTube video in WordPress, you might think it is overly complicated – but it is not. Video embedding in WordPress has been made super easy.
Secondly, if you embed video from a reliable provider such as YouTube or Vimeo, you can be sure that the visitors will be able to watch it easily and reliably which isn’t always a case with the videos that you host. A great number of hosts simply don’t provide enough storage and bandwidth to support hosting videos.
Thirdly, embedding YouTube videos in WordPress will help you to reach new people and get the word out about your blog.
Earlier, we mentioned that there are WordPress plugins that can give you a great variety of options for displaying videos on your website.
Here are some of them that are worth trying out:
If you are looking for a free and reliable WordPress plugin for WordPress embed videos, you should check out Easy Video Player. It can be used to embed either hosted or self-hosted videos on your website. All shared videos will be responsively sized and you can choose a wide variety of options including auto mute, loop, autoplay, etc. On top of that, Easy Video Play makes it possible for you to choose different skins to match your website or blog theme.
Advanced Responsive Video Embedder is a handy little plugin that also allows you to embed responsive videos to match your mobile-friendly theme – and it is free of charge. You can also set a maximum width, alignment, custom aspect ratio, and more, and to make things even better, this plugin expands support for auto-embed to more video providers.
If you are looking for a plugin that will help you expand WordPress auto-embed feature to a lot more providers, you should check out Embedly. Some of the supported providers include Twitch, Google Maps, Gfycat, and 300+ more. In addition to that, with Embedly you can customize the display and style of your videos, add social sharing button etc.
YouTubeR is a great embed YouTube video WordPress plugin that comes with a whole bunch of useful options such as uploading the videos to YouTube directly from your WordPress blog dashboard, creating video galleries, widgets, and more.
Embedding YouTube Videos Using Shortcodes
How to embed videos in WordPress using a shortcode? Let’s go over the basic steps:
- Open the Post Editor for any post, and have a YouTube URL ready.
- In the Content area of the Post Editor, type an open square bracket, the word youtube, space, then paste the YouTube URL, type in a closing square bracket, save and preview the post.
- You can append values to the YouTube URL to modify the display, such as change the width and height, change the start and stop times in the video, affect the alignment and style of the player, etc. To change the dimensions of the video to 320 by 240 for example, append &w=320&h=240 to the YouTube URL and Save and Preview these changes.
Embedding YouTube Playlists into Posts and Pages
Now let’s go over the steps of embedding YouTube playlists into posts:
- Copy the URL for a YouTube Playlist. It’s very similar to a regular YouTube Video URL but will have a list= parameter appended to it.
- Now, you can paste this Playlist URL plainly, and on its own line, just like pasting a YouTube URL into the Post or Page Editor. Do so, save and preview how the Playlist looks on your website.
Why can’t I upload the videos to my WordPress?
Actually, you can upload the videos to WordPress, but we would strongly advise against doing so. The majority of smaller blogs are on shared-hosting accounts and videos take a lot of server resource. This also means your site is likely to crash if your video has lots of traffic.
Also, keep in mind that if you embed YouTube videos, you are not missing out on traffic from the YouTube users. So if you still aren’t sure how to add video to WordPress, we would definitely recommend the embed video WordPress option.
Ending thoughts on how to embed videos in WordPress
In this article, we explained what is embedding a video and how to embed videos in WordPress. The WordPress embed process is relatively simple and it comes with a wide range of benefits that will help your blog or website.
If you still aren’t sure how WordPress embed video works or how to share a YouTube video, go over this article step by step and you will surely figure it out quickly and easily.
If you enjoyed reading this article about how to embed videos in WordPress, you should also read these:
- Creating a CRUD system in WordPress (2018)
- MySQL table snippets and fixes to common problems
- How to Leverage Browser Caching in WordPress? Steps to Follow