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

Find a widget for you

You can use our widgets to accomplish practically any task on your website — increase users' confidence, grow conversion, engage your visitors, provide support, etc.

See All Widgets
GuideVideo Gallery

How to Add Video to WordPress: 4 Easy Ways

Updated September 2026 · 16 min read

Short answer

Use the Video block for a file, the Embed block for YouTube or Vimeo, a Custom HTML block for embed codes, or a video gallery for several videos. Here’s each way, step by step.

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.

The no-code way

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

SettingWhat it does
AutoplayStarts playing on load (works muted)
LoopReplays the video
MutedStarts without sound
Playback controlsShows play, volume and fullscreen
Play inlineKeeps the video in the page on iPhone
PreloadAuto, metadata or none — how much loads up front
Poster imageThe 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 blockVideo pluginVideo Gallery widget
Several videosStack blocks✓✓
Feeds that update—Varies✓
TikTok, Reels, Twitch—Rare✓
MaintenanceNonePlugin updatesNone
Works if you leave WordPress——✓

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

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.

Related

Put your videos on your website

Create a free video gallery in minutes.

Create Widget for Free