This article applies to both self-hosted (wordpress.org) and free-hosted (wordpress.com) blogs.
No additional code is necessary.
From the WordPress Dashboard, selectPosts>Add new.
grab the+icon to add a new block, then selectYouTube.
Go to the YouTube video you want to embed, selectShare, then selectCopy.
Go back to your WordPress post, paste the video URL, then selectEmbed.
you could also paste the YouTube URL into the content editor in both visual and text view.
SelectPublishto make your video go live.
From the WordPress Dashboard, selectAppearance>Widgets.
Drag theVideowidget to the blog sidebar.
Give the video a title, then selectAdd Video.
SelectInsert from URLin the upper-left corner.
Enter the video URL, then selectAdd to Widgetafter the video appears.
From the WordPress content editor, selectHTML.
Go to the YouTube video you wish to embed, selectShare, then selectEmbed.
Paste the iframe code into theHTMLbox in WordPress, then selectPreview.
SelectUpdateif the video looks right.
Experiment with different Player Parameters within the iframe code for full customization.
Add each parameter after the source (src) URL.
How to Embed YouTube Videos With WordPress Plugins
Using apluginis another reliable method for embedding YouTube videos.
Some plugins give you a range of additional features to customize how the video appears on the page.
From the WordPress Dashboard, selectPlugins>Add New.
Enteryoutube embedinto the plugin search box, choose a plugin, then selectInstall Now.
SelectActivateafter the plugin installs.