The right way to simply embed movies in WordPress weblog posts
Do you want to embed videos in your WordPress blog posts? Videos bring life to your website and are a great way to increase user engagement.
WordPress makes it super easy to embed videos from video hosting sites like YouTube, Vimeo, Facebook, Twitter, and many others.
In this beginner’s guide, we’re going to show you how to easily embed videos in WordPress blog posts, pages, and sidebar widgets.
Embed videos in WordPress blog posts and pages
WordPress has a great feature called auto-embeds that allows your website to automatically pull the embed code from popular video hosting services like YouTube, Vimeo, etc.
All you have to do is paste the video url into the WordPress editor.
For example, you can copy the YouTube URL for a video that you want to embed.
Next, edit the WordPress post or page that you want to add the video to and just paste the url into the content area.
Once you paste the video url, WordPress will pull in the embed code and display the YouTube video in the content editor.
You can now save your post and click the preview button to see the embedded video in your blog post.
Wasn’t that easy?
After you’ve added the video, you can change its settings in the block toolbar and in the settings column on the right.
You can adjust the video width, set it to full width, change the orientation and much more. You can also add a caption and keep the aspect ratio of the video on mobile devices.
WordPress can only do automatic embeds for video services on the whitelist. For other websites, you will still need to get the embed code and then paste it into your blog posts.
Here is a list of the video services on the whitelist for automatic embedding in WordPress:
- College humor
- Crowd signal
- Some cards
- Speaker deck
If you want to add a video from a website outside of this list, you’ll need the full HTML embed code for the video.
Just copy and paste the HTML provided by the video website and paste it into a custom HTML block in the editor.
Embed videos in WordPress using the Old Classic Editor
If you’re still using the old classic WordPress editor, you can embed the videos the same way.
Just copy the url from a video hosting service like YouTube and paste it into the editor. When using the visual editor, the video will be previewed.
However, you cannot use the width adjustment and other options that you can use in the new WordPress block editor.
Embed video in WordPress sidebar widgets
Just like with a WordPress page or post, you can also embed videos in WordPress sidebar widgets.
Just go to Appearance »Widgets Page and add the Text widget to a sidebar. Check out our article on how to add and use widgets in WordPress.
In the widget settings you need to paste the video url into the content area. WordPress will automatically retrieve the embed code and display the video preview.
Don’t forget to click the “Save” button to save your widget settings.
You can now visit your website to see the video embedded in the WordPress sidebar widget.
WordPress Video Embed Plugins
By default, you don’t need to use a plugin to embed videos in WordPress. However, you may want to use plugins to improve the video experience on your website.
Below are a few plugins that you might want to try.
1. Smash Balloon YouTube feed
Smash Balloon Feeds for YouTube is one of the best WordPress video plugins out there. You can automatically embed all of the videos on your YouTube channel in a customizable gallery format. It automatically imports new videos, combines feeds, adds live streaming, and more.
There’s also a free version of Smash Balloon’s YouTube feed plugin, but we’re showing the Pro version in our demo below.
First you need to install and activate the Smash Balloon Feeds for YouTube plugin. From there you go to Feeds for YouTube »License Page and enter your license key. You can find this information under your account on the website of the plugin.
After activating your license key, don’t forget to click the “Save changes” button. Next, go to the “Configure” tab and click the big blue button to connect your YouTube account.
Once you’re done, you’ll be taken back to your WordPress dashboard to set up your YouTube feed.
Click the “Save Changes” button and you’re good to go.
To embed your YouTube feed in a post or page, simply edit it in WordPress. On the edit page screen, click the (+) Button to add a new block and select the Feeds for YouTube block.
When you add the block to your post editor, it will automatically pull and display videos from your YouTube channel.
If you check your website, you’ll see that your feed is embedded in the page you just created.
Smash Balloon YouTube Feeds offers several layout and style options. You can change the default style by visiting the Feeds for YouTube »Customize Page.
Here you can choose a grid, gallery, list, or carousel layout. Don’t forget to click the Save Changes button to save your changes.
You will see that you have a carousel of videos with left and right navigation arrows, and a Subscribe button at the bottom of your feed.
If you’d like to further customize your feed, click the Display tab in the plugin setting. This page lists the range of shortcodes that you can use anywhere on your site.
To insert a shortcode in a post or page, you can use the shortcode block.
Now you can add your feed shortcode [youtube-feed] (or any variation) in the block settings.
You can also use the Smash Balloon YouTube feed with the new Social Wall plugin, which combines all of your social media content from Facebook, Instagram, Twitter and YouTube on a single page.
2. YouTube subscription bar
The YouTube subscription bar shows a YouTube subscription button under your YouTube videos embedded in WordPress. It also gets the number of your YouTube subscribers to add social evidence and encourage more users to subscribe.
We created it first to promote WPBeginner’s YouTube channel on this website. Many of our users asked us to let us know how we did it. That’s why we decided to release it as a free plugin.
3. Lazy load for videos
Video embeds load scripts from external websites, which has little effect on page load speed and performance.
Lazy Load for Videos solves this problem by only loading the video image when the page is loaded. The embed code will only load when the user clicks the play button. Our tutorial will show you how to lazily load videos in WordPress.
By the way, you don’t need this plugin if you’re using the Smash Balloon YouTube feed, as it has built-in caching and delayed loading for the video player.
Why can’t I upload the videos to WordPress?
You can, but we do not recommend that you do this.
Most small blogs use shared WordPress hosting accounts, and videos can consume a lot of server resources. If your video has a lot of traffic, your website is more likely to crash.
Second, you are missing out on traffic from YouTube users.
Not only is YouTube the largest video hosting site, it’s also the second most popular search engine in the world and the second most popular social network just after Facebook.
If you don’t want to upload your videos to YouTube, you can try Vimeo or DailyMotion. Check out our comparison of YouTube versus Vimeo to find out which platform is better for your needs.
For more information on this topic, check out our article on Why You Should Never Upload a Video to WordPress.
We hope this article has helped you learn how to easily embed videos in WordPress blog posts. You might also want to see our list of WordPress plugins required for all websites.
If you enjoyed this article, please subscribe to our YouTube channel for WordPress video tutorials. You can also find us on Twitter and Facebook.