Ways to add video to WordPress
- Use the Video block for one file
In the block editor click + → Video, then upload a file or pick one from the Media Library. Good for a single short clip.
- Use the Embed block for YouTube or Vimeo
Paste a YouTube or Vimeo link on its own line, or add an Embed block. WordPress turns the link into a player automatically.
- Use Custom HTML for embed code
Add a Custom HTML block and paste an iframe or widget code. In the classic editor, switch to the Text tab first.
- Page builders
In Elementor, Divi or Beaver Builder use the Video module for one video, or the HTML/Code module for embed and widget codes.
Should you upload videos to the Media Library?
WordPress can host video files, but every view is served from your hosting. For anything longer than a short clip, upload to YouTube or Vimeo and embed it — it’s faster for viewers and cheaper for you.
How to add a video gallery to WordPress
WordPress has no built-in video gallery. You can install a gallery plugin, or paste a cloud widget into a Custom HTML block — no plugin to update or conflict with your theme.
Create a video gallery or YouTube feed and paste its code into a Custom HTML block or Elementor’s HTML widget.
Try Elfsight Video Gallery →Autoplay, loop and responsive tips
- Autoplay only works muted in most browsers.
- Embeds from the Embed block are responsive in most themes; for custom iframes use an aspect-ratio wrapper.
- Use our YouTube embed code generator for options like start time and loop.
Video block settings explained
| Setting | What it does |
|---|---|
| Autoplay | Starts playing on load (works muted) |
| Loop | Replays the video |
| Muted | Starts without sound |
| Playback controls | Shows play, volume and fullscreen |
| Play inline | Keeps the video in the page on iPhone |
| Preload | Auto, metadata or none — how much loads up front |
| Poster image | The image shown before playback |
File size limits and formats
WordPress accepts MP4, MOV, WebM and other formats, but your host sets the maximum upload size. If uploads fail, the file is probably above that limit — compress it or upload to YouTube or Vimeo instead. MP4 with H.264 plays everywhere.
Embed videos from other platforms
WordPress turns links from many services into players automatically (oEmbed) — YouTube, Vimeo, TikTok, Dailymotion and others. Paste the link on its own line or use the Embed block. For Instagram, WordPress no longer embeds posts automatically; use a Custom HTML block with the embed code or a widget.
Plugin, block or widget?
| Video / Embed block | Video plugin | Video Gallery widget | |
|---|---|---|---|
| Several videos | Stack blocks | ✓ | ✓ |
| Feeds that update | — | Varies | ✓ |
| TikTok, Reels, Twitch | — | Rare | ✓ |
| Maintenance | None | Plugin updates | None |
| Works if you leave WordPress | — | — | ✓ |
Troubleshooting
- The embed shows a link, not a player
Put the link on its own line, or use the Embed block.
- The video isn’t responsive
Enable responsive embeds in your theme or wrap the iframe in an aspect-ratio container.
- Embeds disappeared after a plugin update
Check caching, lazy-load and privacy plugins that replace iframes.
Add a video gallery to WordPress with Elfsight
- Open the page
In WordPress go to Pages, hover over the page and click Edit.
- Add a Custom HTML block
Click the blue + icon, find Custom HTML and drag it where the gallery should appear.
- Paste the code and save
Paste the Video Gallery installation code into the HTML window and save. This works in both classic and block themes.
- Sidebar or all pages
For a widget area use Appearance → Customize → Widgets → + → Custom HTML, then Publish.
WordPress.com: embedding scripts requires the Business or Commerce plan; on Free, Personal and Premium the code shows as plain text. Self-hosted WordPress.org has no such limit.
Full guide with screenshots: Adding Elfsight widget to WordPress ↗ · Prefer not to do it yourself? Request free installation ↗
Frequently asked questions
How do I embed a video in WordPress?
To embed a video in WordPress, paste a YouTube or Vimeo link into the block editor, use the Video block for files, or a Custom HTML block for embed codes and galleries.
How do I embed a YouTube video in WordPress?
Paste the YouTube link on its own line in the block editor or use the Embed block; WordPress converts it into a player.
How do I add a video gallery to WordPress?
Use a gallery plugin, or paste a video gallery widget’s code into a Custom HTML block.
Can I add a YouTube channel to WordPress?
Yes, with a YouTube feed widget or plugin that shows your uploads automatically.
Why is my WordPress video not playing?
Check the file format (MP4/H.264 works everywhere), file size limits of your hosting, and that the embed isn’t blocked by a privacy or cookie plugin.
What video formats does WordPress support?
MP4, M4V, MOV, WMV, AVI, MPG, OGV, 3GP, 3G2 and WebM — MP4 (H.264) is the safest choice.
Why won’t my video upload to WordPress?
It’s probably larger than your host’s upload limit. Compress it or host it on YouTube or Vimeo.