How to Add Video to WordPress: 4 Easy Ways
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.
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
Autoplay
What it does
Loop
What it does
Muted
What it does
Playback controls
What it does
Play inline
What it does
Preload
What it does
Poster image
What it does
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?
Several videos
Video / Embed block
Video plugin
Video Gallery widget
Feeds that update
Video / Embed block
Video plugin
Video Gallery widget
TikTok, Reels, Twitch
Video / Embed block
Video plugin
Video Gallery widget
Maintenance
Video / Embed block
Video plugin
Video Gallery widget
Works if you leave WordPress
Video / Embed block
Video plugin
Video Gallery widget
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 ↗
On this page
