← Documentation

Autoplay a video popup on page load (PRO)

Last updated:

Want visitors to see a video the moment they land on a page, like a welcome video, a product demo or an announcement? With WP Video Popup PRO the video popup can open automatically on page load, no click needed.

Autoplay on page load is a PRO feature. See WP Video Popup PRO.


Add autoplay to the shortcode

Add autoplay="1" and mute="1" to your shortcode:

[wp-video-popup autoplay="1" mute="1" video="https://www.youtube.com/watch?v=YlUKcNNmywk"]

Paste it wherever you’d normally add the shortcode: a Shortcode block, an Elementor Shortcode widget, a Divi Code module or a Bricks Shortcode element. The popup opens as soon as the page has loaded.

It works with YouTube, Vimeo, Rumble and self-hosted videos.

Let visitors open it again

Once a visitor closes the popup, it stays closed. To let them watch the video again, add a button or image with the CSS class wp-video-popup, or use the text attribute to let the shortcode add a button:

[wp-video-popup autoplay="1" mute="1" video="https://www.youtube.com/watch?v=YlUKcNNmywk" text="Watch video"]

Why the video needs to be muted

Browsers block videos that start with sound before the visitor has clicked anything. With mute="1" the video plays straight away, and visitors can turn the sound on in the player. Without it, the popup opens but the video may not start. More in video popup doesn’t autoplay.


Open a specific video from a link

Have several videos on one page? Instead of autoplaying one for everybody, you can open a specific popup only for visitors who come from a certain link, like a newsletter, an ad or a social media post. Add the video’s ID to the URL:

[wp-video-popup id="demo" video="https://www.youtube.com/watch?v=YlUKcNNmywk"]
https://yourwebsite.com/your-page/?video=demo

Visitors who open that link see the popup right away. Everybody else sees the page as usual. More on IDs in multiple video popups.


Things to keep in mind

  • Privacy (GDPR): a YouTube or Vimeo video that opens on page load connects to their servers before the visitor has clicked anything. Ask for consent first with your cookie plugin, use a youtube-nocookie.com link, or use a self-hosted video.
  • Use it on the right pages: an autoplaying popup works well on landing pages and campaign pages. On every page it quickly gets in the way.
  • Caching: clear your cache after adding or changing the shortcode.

Related guides

Still need help?

Browse the other articles or create a support ticket and we'll get back to you.