How to embed a video in WordPress without YouTube (and without plugins)
Updated: October 28, 2026
Uploading videos straight to the WordPress media library looks easiest, but it’s a bad idea: heavy files fill up your hosting, your site gets slow and the video doesn’t adapt to the visitor’s connection. The recommended approach is to host the video on a video service and embed it with an iframe. Here’s how with Dembed, without YouTube and without installing anything.
Why not upload the video to the media library
- It uses your hosting’s storage and bandwidth, which are usually limited.
- A raw MP4 doesn’t adapt quality: on mobile with a weak connection it stutters.
- It hurts loading speed (Core Web Vitals), which affects your SEO.
- You get no play stats and earn nothing from views.
Step by step: embed a Dembed video in WordPress
- 1Create your free Dembed account and upload the video from the dashboard (drag and drop).
- 2When it’s ready, open the video and click “Copy iFrame” (choose “Responsive” so it fills your page width).
- 3In the WordPress editor (Gutenberg), add a “Custom HTML” block.
- 4Paste the code and click “Preview”. In the classic editor, paste it in the “Text” tab.
- 5Publish. The video is lazy-loaded, so it doesn’t slow down your page.
The code you’ll paste
It looks like this (replace the ID with your video’s). It’s responsive: it keeps a 16:9 ratio at any width.
<div style="position:relative;width:100%;padding-top:56.25%"><iframe src="https://dembed.cc/embed/v_YOUR_ID" title="My video" style="position:absolute;inset:0;width:100%;height:100%;border:0" allow="autoplay; fullscreen; picture-in-picture; encrypted-media" allowfullscreen loading="lazy"></iframe></div>Tips for a perfect result
- Customize the player once (brand color, logo, “Skip intro”) in the Player section of your dashboard; it applies to all embedded videos.
- If your theme has a narrow content width, use a full-width “Group” block for a larger video.
- Upload .srt or .vtt subtitles in several languages to reach more people.
- Elementor, Divi and other builders have an “HTML” widget where it works the same way.
Earn money from your blog’s videos
With Dembed, videos embedded in your WordPress show ads in the player and you get your share of the real revenue every month, from your first video. It’s a way to monetize your blog without adding more banners.
Frequently asked questions
No. A “Custom HTML” block and your video’s iframe are enough.