How to Embed a Video in WordPress

Editors Note: Do you need help with your WordPress site? Learn how you can get Unlimited WordPress Support 24/7 by U.S. based developers. Learn more

Are you looking for a robust and seamless way to embed a video in your WordPress blog?

Videos play a vital role in attracting and engaging visitors to your site. Embedding videos on your site is not a difficult task anymore, and you can embed videos from YouTube, Vimeo, Facebook, and Instagram.

In this post, I’ll focus on how you can embed videos easily from different platforms in your WordPress posts, pages, and sidebar widgets.

Let’s roll on.

How to Embed a Video in WordPress Posts and Pages

WordPress has an auto-embed feature by default that makes it super easy to embed videos automatically.

First of all, let’s discuss how you can easily embed YouTube and Vimeo videos in your blog post.

  • In the first step, copy the URL of the video you want to embed in your blog post from YouTube or Vimeo. Or you copy the special embed link.

YouTube URL link

YouTube embed link

 

  • Next, paste the URL into your blog post content.

Embed a video into WordPress

  • Now, once you have pasted the URL in your blog post, WordPress will automatically fetch the embed code, and you will see the YouTube video in your content area.

preview of embed video

  • Once you are done with the video embedding procedure, you can adjust its alignment and settings from the toolbar area of the block.
  • The settings that can be done after embedding the video are alignment, setting the width of video or making it full-width, adding a caption, and you can also adjust the video’s alignment as per the mobile screen view.

WordPress can only auto-embed videos from white-listed video services.

Here’s the list of white-listed video services from which WordPress can get auto-embed video URLs.

  • TED
  • Tumblr
  • YouTube
  • Dailymotion
  • Facebook
  • Scribd
  • Slideshare
  • SmugMug
  • Mixcloud
  • Reddit
  • ReverbNation
  • Amazon
  • Animoto
  • Cloud
  • CollegeHumor
  • Crowdsignal
  • Flickr
  • Hulu
  • Imgur
  • Instagram
  • Issuu
  • Kickstarter
  • Screencast
  • Someecards
  • SoundCloud
  • Speaker Deck
  • Spotify
  • Twitter
  • VideoPress
  • Vimeo
  • tv

If you are looking to add videos from other resources outside this list, then you’ll have to copy the HTML code provided by that video website and then paste it into the “Custom HTML Block” in the editor.

Here is an example of an HTML video embed code:

YouTube HTML Embed Code

How to Embed Video in WordPress Classic Editor

If you are using WordPress classic editor, then the same procedure applies to add videos in your post as we mentioned earlier.

Copy the URL from the video hosting service such as YouTube, Vimeo, or Facebook and then past it in the post content.

  • Click the Add Media button 

Click Add Media Button

 

  • Click Insert Media URL in the side tab and paste the video link

Insert Video from URL

 

You will see the preview of the video right away.

The only difference between using WordPress classic editor and WordPress block editor is that it doesn’t allow you to adjust the width and alignment of the video as you can in the WordPress block editor.

Embed Videos in WordPress Sidebar Widgets

Likewise, if you want your videos as a sidebar widget, it can be done quickly, just like we have done in posts and pages.

Follow this route to create a widget.

  • Navigate to Appearance > Widgets

WordPress widgets

  • Now Drag and Drop the “Video widget” into the desired sidebar

Video Widget

  • Click the down arrow to open up the tab and click “Add Video

Open Video Widget

 

  • Click Insert from URL on the side menu and paste the video url

Insert from URL

Once you have pasted the URL successfully, WordPress will fetch the video code automatically, and the preview of the video will be visible in the widget settings.

  • You can now save the settings.

Why is it not recommended to upload videos directly to your WordPress site?

You might be thinking, why are we adding codes or URL instead of uploading videos directly into our site?

The answer is that you can upload the video, but it will occupy a lot of space in your server.

And, if you have uploaded multiple videos directly into WordPress, it will slow down the performance and page upload speed.

So, it is recommended to use other resources to upload your videos such as YouTube and Vimeo and then paste the URL in your post content.

WordPress Plugins to Embed Videos on Your Site

Although WordPress has solved this issue of video embedding pretty well, still, if you want to add some more features to enhance the video viewing experience, then you can try some WordPress plugins that come with lots of interesting features.

For example, if you want to show the subscribe button under your video in your content or if you are looking to display a video gallery, then try these awesome plugins to enhance the user experience.

Embed Plus for YouTube Plugin

 

YouTube Embed Plus

The Embed Plus for YouTube plugin will allow you to embed a YouTube gallery to your page or post. If you wanted to display a channel or playlist or even YouTube live stream vides this is a great option for you.

Envira Gallery Plugin

Envira plugin

The Envira plugin has a unique feature to display your embedded videos as a video gallery because WordPress doesn’t come with this feature by default.  You can create beautiful video galleries with lightbox popup.

Wrapping Up

So, here ends our tutorial; I hope you find it helpful to embed videos on your WordPress site.

You can contact us if you are looking for any kind of help related to WordPress. Or sign up for our unlimited WordPress support service here.

Anthony Tran

Anthony Tran is the founder of AccessWP. He also offers WordPress website design in Chandler AZ. He likes to watch NBA basketball and catch the latest blockbuster movie.