How to Embed a YouTube Video in WordPress

The oEmbed feature of WordPress allows you to easily embed a YouTube video into a page without having to install a plugin.

YouTube Embed with URL

There are two ways to embed a YouTube video. The easiest option would be to copy and paste the YouTube URL into the page content area. If you are editing in visual mode, It is a good idea to select the “Paste as text” option before pasting the YouTube URL. This will remove any hidden formatted characters from the URL. Alternatively, you can switch to the “text” editor and paste the URL.

screenshot showing how to embed a YouTube video in WordPress

Once you have pasted the URL WordPress will show a preview of the video in the visual editor.

screenshot showing a preview of the YouTube video in the WordPress visual editor

YouTube Embed with Shortcode

If you want to customize the width and height of the YouTube video or do not like the URL embed method, you can embed it with a shortcode.

[embed width="480" height="360"][/embed]

However, If you choose to use the embed shortcode I would recommend you not to specify a width and height. This is to make sure that your YouTube video looks great on mobile devices.


Are you using the same method to embed a YouTube video on your website? Feel free to share your thoughts in the comments.

Disclosure: This page may contain affiliate links. If you follow one of those affiliate links and purchase something it will provide me with a little bit of a commission. This costs you nothing extra but helps maintain my site, free plugins, and themes. So I thank you for your support.

Leave a Comment