How do I embed a video into a post on my website?
The easiest way to add a video to your website is to host it on YouTube or Vimeo, then embed it on your page. This keeps your site fast and gives visitors smooth playback.
Why not upload the video file directly? Video files are large. Uploading them to WordPress can slow down your site and may be larger than your site's upload limit. YouTube and Vimeo handle streaming for you.
Step 1: Copy the video link
- YouTube: open the video, click Share, then click Copy. You can also copy the web address from your browser's address bar.
- Vimeo: open the video, click Share, then copy the video link.
Step 2: Add the video to your page or post
- Log in to WordPress and open the page or post in the editor.
- Click where you want the video to appear.
- Paste the video link on its own line and press Enter. WordPress will automatically turn it into an embedded video.
Or use the embed block:
- Click the + icon and search for YouTube or Vimeo.
- Select the block, paste the video link into the box, and click Embed.
Step 3: Adjust and publish
- Caption: click below the video to add one, if you'd like.
- Size and alignment: use the block toolbar and the settings panel on the right. The video automatically resizes on phones and tablets.
- Publish: click Save or Update (or Publish for a new page) to make it live.
Troubleshooting
- The video shows as a plain link. Make sure the link is on its own line with nothing else on it, or use the YouTube or Vimeo embed block instead.
- The video says it can't be embedded or played on other websites. The video owner has turned off embedding. If it's your video, turn on embedding in your YouTube Studio or Vimeo video settings.
- The video is private. Only public or unlisted YouTube videos, and Vimeo videos with embedding allowed, will play on your website.
Privacy tip: if your website uses a cookie consent banner, YouTube videos can set cookies when they load. Contact Gate 39 about using YouTube's privacy-enhanced mode, which doesn't set cookies until the visitor plays the video.
Using a page builder? If your site uses a page builder such as Elementor, use its Video widget and paste the video link into the widget's settings.
Need help? Contact the Gate 39 team through the Customer portal.