NEWMeet the new Video Gallery — YouTube, TikTok, Instagram Reels, Vimeo and Twitch in one widget.
Guide

How to Add Video to WordPress: 4 Easy Ways

Updated September 2026 · 16 min read

Ways to add video to WordPress

  1. 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.

  2. 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.

  3. 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.

  4. 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.

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

Autoplay

What it does

Starts playing on load (works muted)

Loop

What it does

Replays the video

Muted

What it does

Starts without sound

Playback controls

What it does

Shows play, volume and fullscreen

Play inline

What it does

Keeps the video in the page on iPhone

Preload

What it does

Auto, metadata or none — how much loads up front

Poster image

What it does

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
—
—
✓

Several videos

Video / Embed block

Stack blocks

Video plugin

✓

Video Gallery widget

✓

Feeds that update

Video / Embed block

—

Video plugin

Varies

Video Gallery widget

✓

TikTok, Reels, Twitch

Video / Embed block

—

Video plugin

Rare

Video Gallery widget

✓

Maintenance

Video / Embed block

None

Video plugin

Plugin updates

Video Gallery widget

None

Works if you leave WordPress

Video / Embed block

—

Video plugin

—

Video Gallery widget

✓

Troubleshooting

  1. The embed shows a link, not a player

    Put the link on its own line, or use the Embed block.

  2. The video isn’t responsive

    Enable responsive embeds in your theme or wrap the iframe in an aspect-ratio container.

  3. Embeds disappeared after a plugin update

    Check caching, lazy-load and privacy plugins that replace iframes.

Add a video gallery to WordPress with Elfsight

  1. Open the page

    In WordPress go to Pages, hover over the page and click Edit.

  2. Add a Custom HTML block

    Click the blue + icon, find Custom HTML and drag it where the gallery should appear.

  3. 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.

  4. 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

Related

WordPress Video Gallery

Add a video gallery, video player or YouTube feed to WordPress in minutes.WordPress Video Gallery