WordPress.org

Forums

[closed] Embed youtube video not working (31 posts)

  1. Paul
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to embed a youtube video on my site, but when I save changes it appears only as a URL (scroll right to the bottom of the page to see).

    I went to this WordPress Support page which says you only have to paste in the URL and it should automatically embed, but it isn't.

    FYI, I'm using a child theme of Superhero, and trying to embed with the PageBuilder plugin (I've tried it on a normal page too and the same problem persists).

    I'm sure it's something simple, but any help will be massively appreciated!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Are you sure that you are adding the correct url - ie the url of the video and not the code that YT provides.

  3. Paul
    Member
    Posted 1 year ago #

    Wow, thanks for the amazingly fast response! This is the link I'm adding:

    http://www.youtube.com/watch?v=vBASpyfyAyA&safe=active

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    That's the wrong url. Try http://youtu.be/vBASpyfyAyA

  5. Paul
    Member
    Posted 1 year ago #

    Still no joy. Is there supposed to be a dot in the middle of 'tube'?

  6. Paul
    Member
    Posted 1 year ago #

    When I load the video in youtube, the url that comes up is the one I initially put. Also the WordPress Support page suggests a similar syntax (ie, including watch?v= and &safe=active...

  7. esmi
    Forum Moderator
    Posted 1 year ago #

    Is there supposed to be a dot in the middle of 'tube'?

    Yes

  8. Paul
    Member
    Posted 1 year ago #

    Ok... well it still doesn't work!

    I've tried pasting the url into the Add Media thing (in visual editor), and this works but only gives me the option to have a text hyperlink, and then it will take me to the page.

    I'm trying to use the Responsive Lightbox plugin, which says you need to embed the video into the page and it will automatically make a lightbox pop-up for it.

    Regardless of the plugin, I have read that you're WordPress is supposed to automatically embed videos when you just add the url.

    Very confused!

  9. Just to cross it off the list try wrapping the YouTube URL in [embed]...[/embed] like so in the post.

    [embed]http://www.youtube.com/watch?v=vBASpyfyAyA[/embed]

    See if that fixes it.

  10. Paul
    Member
    Posted 1 year ago #

    Thanks Jan, tried it and no luck unfortunately. At least this time the url isn't just appearing as plain text. But it's just blank - no video embedded...

  11. swagsgalore
    Member
    Posted 1 year ago #

    Try this approach, this works for me.
    '[youtube=http://www.youtube.com/watch?v=cw2zQKKbfPU]'

    Also you can see how I have innovatively added the you to my web site on each item page, how to on helping our customers install the curtains we sell.

    [Link removed]

  12. That can only work if you have a plugin that handles the [youtube shortcode.

    Paul try deactivating all of your plugins, switch to the Twenty Fourteen theme and then edit that post with this text.

    [embed]http://www.youtube.com/watch?v=vBASpyfyAyA[/embed]

    I'm hoping that works because then it would point to a plugin or theme conflict.

  13. Stoo42
    Member
    Posted 1 year ago #

    I know this thread is a bit old now, but I had the same issue and found a solution that fixed my problem that no one else seems to have mentioned.

    Basically I run my own wordpress server from home. I had a situation where I had a power outage and the wordpress server came back up BEFORE my dhcp server. Now linux is smart, it gave the same IP address, so everything should be working, right?
    Sadly... DNS wasn't working.

    So, my issue was that if the wordpress server cannot see youtube, then it will not embed the video. Once it has embedded the video once, it will stay embedded, which is why old posts work.
    My guess is that wordpress needs to go to youtube to verify the clip and verify the sizes/settings on the clip in order to embed properly. It does this at the time you save your blog post. If the server cant see youtube, then the embed will always fail, no matter what tags you put around it.

    Fix the servers access to youtube, click "update" on your posts affected, and the embed should start working again. :-)

    Of course this is easier if you have access to your server... If you're in a hosting situation, I know some web hosts may not allow their servers direct internet access, or may have changed their policies which would mean embedding breaks. I guess a support call to your hosting provider is your only option in this instance. :-(

  14. chadelliott2012
    Member
    Posted 1 year ago #

    Of course this is easier if you have access to your server... If you're in a hosting situation, I know some web hosts may not allow their servers direct internet access, or may have changed their policies which would mean embedding breaks. I guess a support call to your hosting provider is your only option in this instance. :-(

    This fixed my problem. I have a two wordpress accounts each hosted by two different servers. One server just would not work, and then I tried the other after reading your post and it worked instantly.
    My guess is that most of everyone's issues are probably server side. Hopefully Paul sees your post and mine.

  15. Denise Author
    Member
    Posted 11 months ago #

    I too have this problem of Youtube video not embedding. I'm running WordPress 4 (with Twenty Twelve and using a Child backup). WordPress 4 says its easy, but it isn't. If I just put in the code as it says, I just see the code on the page. http://youtu.be/kS18RC7KfkA - no embedded video. If I put this url into the Media File...and say post in page, it's true a Big Black box comes into screen but will not play. This should be so easy. Anyone still about?
    http://www.rosemarycarr.co.uk page The Precious Sea.
    regards, Denise

  16. lkalif
    Member
    Posted 11 months ago #

    Denise, yes I have the exact same problem. Youtube embedding worked fine until couple of weeks ago, and now does nothing. Just shows plain link.

  17. Abcmoteur
    Member
    Posted 11 months ago #

    Same for me as Ikalif.

  18. Salvosky
    Member
    Posted 10 months ago #

    This code worked for me

    [video src="http://www.youtube.com/watch?v=oHg5SJYRHA0"]

  19. That code can only work if you have a plugin that supports that the video short code.

    This will always work on WordPress:

    [embed]http://www.youtube.com/watch?v=oHg5SJYRHA0[/embed]

    But that explicit [embed]...[/embed] shouldn't be necessary. Just copy and paste the URL to a new line by itself.

    http://www.youtube.com/watch?v=oHg5SJYRHA0

    That should just work but if it doesn't then wrap it in embed as above.

  20. Salvosky
    Member
    Posted 10 months ago #

    I tried that code on my WordPress but the result was no video on the post, only an active link was appearing. I only got it to work with the code that I described above.

  21. Abcmoteur
    Member
    Posted 10 months ago #

    [embed] doesn't work too for me. I get a link.

  22. mrechte
    Member
    Posted 10 months ago #

    It works on my development server at home but not on my hosted virtual machine. When I paste an URL, I can see a progress bar for a while then the url is just pasted as normal text. Server has no firewall rule on the out interface.

  23. mrechte
    Member
    Posted 10 months ago #

    Interesting finding, the request fails on the hosted server: Trying "wget http://youtu.be/ErLpzD-O6ZY"

    On Dev server:
    **************

    [mrechte@linux2 ~]$ wget http://youtu.be/ErLpzD-O6ZY
    --2014-10-21 17:06:22-- http://youtu.be/ErLpzD-O6ZY
    Résolution de youtu.be (youtu.be)… 173.194.41.36, 173.194.41.32, 173.194.41.40, ...
    Connexion à youtu.be (youtu.be)|173.194.41.36|:80… connecté.
    requête HTTP transmise, en attente de la réponse… 302 Found
    Emplacement : http://www.youtube.com/watch?v=ErLpzD-O6ZY&feature=youtu.be [suivant]
    --2014-10-21 17:06:22-- http://www.youtube.com/watch?v=ErLpzD-O6ZY&feature=youtu.be
    Résolution de http://www.youtube.com (www.youtube.com)… 74.125.206.136, 74.125.206.93, 74.125.206.91, ...
    Connexion à http://www.youtube.com (www.youtube.com)|74.125.206.136|:80… connecté.
    requête HTTP transmise, en attente de la réponse… 200 OK
    Taille : non indiqué [text/html]
    Sauvegarde en : « ErLpzD-O6ZY.1 »

    [ <=> ] 172 922 182KB/s ds 0,9s

    2014-10-21 17:06:23 (182 KB/s) - « ErLpzD-O6ZY.1 » sauvegardé [172922]

    On hosted server:
    ****************
    [root@vps97604 ~]# wget http://youtu.be/ErLpzD-O6ZY
    --2014-10-21 17:01:31-- http://youtu.be/ErLpzD-O6ZY
    Résolution de youtu.be (youtu.be)... 2a00:1450:4007:806::1002, 173.194.45.64, 173.194.45.65, ...
    Connexion vers youtu.be (youtu.be)|2a00:1450:4007:806::1002|:80...connecté.
    requête HTTP transmise, en attente de la réponse...403 Forbidden
    2014-10-21 17:01:35 ERREUR 403: Forbidden.

    One can notice that it uses ipV6 on the hosted server.

    Disabling ipv6 on the hosted server solves this error but does not solve the WP issue :(

    Digging little bit more in the oEmbed protocol (http://oembed.com/) it seems the request to submit to youtube for the above video is:

    http://www.youtube.com/oembed/?url=http%3A//youtu.be/ErLpzD-O6ZY

    Which returns the expected file on my hosted server:

    [root@vps97604 ~]# wget http://www.youtube.com/oembed/?url=http%3A//youtu.be/ErLpzD-O6ZY
    --2014-10-21 17:34:22-- http://www.youtube.com/oembed/?url=http%3A//youtu.be/ErLpzD-O6ZY
    Résolution de http://www.youtube.com (www.youtube.com)... 173.194.45.69, 173.194.45.70, 173.194.45.71, ...
    Connexion vers http://www.youtube.com (www.youtube.com)|173.194.45.69|:80...connecté.
    requête HTTP transmise, en attente de la réponse...200 OK
    Longueur: non spécifié [application/json]
    Sauvegarde en : «index.html?url=http:%2F%2Fyoutu.be%2FErLpzD-O6ZY»

    [ <=> ] 573 --.-K/s ds 0s

    2014-10-21 17:34:23 (28,5 MB/s) - «index.html?url=http:%2F%2Fyoutu.be%2FErLpzD-O6ZY» sauvegardé [573]

    [root@vps97604 ~]# cat index.html\?url\=http\:%2F%2Fyoutu.be%2FErLpzD-O6ZY
    {"type": "video", "provider_name": "YouTube", "width": 459, "height": 344, "thumbnail_width": 480, "title": "QUICK UK 600 700 CHINESE WEIGHT TEST", "author_name": "ROBRENZ", "version": "1.0", "author_url": "http:\/\/www.youtube.com\/user\/ROBRENZ", "provider_url": "http:\/\/www.youtube.com\/", "thumbnail_height": 360, "html": "\u003ciframe width=\"459\" height=\"344\" src=\"http:\/\/www.youtube.com\/embed\/ErLpzD-O6ZY?feature=oembed\" frameborder=\"0\" allowfullscreen\u003e\u003c\/iframe\u003e", "thumbnail_url": "http:\/\/i.ytimg.com\/vi\/ErLpzD-O6ZY\/hqdefault.jpg"}

  24. kanuj
    Member
    Posted 10 months ago #

    It is very simple to do go to youtube check there is an option below the video which say share click it you will see the option embedd click that embedd option you will see a string like this <iframe width="560" height="315" src="//www.youtube.com/embed/8aVkMy93a_s" frameborder="0" allowfullscreen></iframe>

    copy the string and then goto your site open the post and in text editor mode paste it like this Candytech video smartphone google gesture

  25. Gilles
    Member
    Posted 10 months ago #

    Just posted a new topic...
    Same problem : worked before, now no.

    Will ask my webhosting company.

    Anyway, iframe embedding works, even if it is not... visual embedding ;)

  26. kristifof
    Member
    Posted 10 months ago #

    Same problem. If I copy the embed code directly into WP 4.0 post it just shows as text once published.

    I surrounded the share URL with the embed wrapping and that gives me an active link but still won't embed the actual video.

    Any suggestions?

  27. Praj
    Member
    Posted 10 months ago #

    hi
    plz check that ur url for video is correct.
    -
    To quickly embed a YouTube video, simply copy the video’s URL from your web browser’s address bar while viewing the video:

    ex:http://www.youtube.com/watch?v=dQw4w9WgXcQ
    -
    Also, you can optionally wrap the URL in the [embed] shortcode. It will accomplish the same effect, but does not require the URL to be on its own line. It also allows you to set a maximum (but not fixed) width and height,
    like so:
    [embed width="123" height="456"]http://www.youtube.com/watch?v=oHg5SJYRHA0[/embed]

    ref:
    -http://www.wikihow.com/Embed-a-YouTube-Video-Into-a-WordPress-Blog
    -http://codex.wordpress.org/Embeds

  28. acotgreave
    Member
    Posted 9 months ago #

    hi
    this is NOT a problem with people incorrectly using the wrong URL. I have the same problem. Check out this video of it:
    https://www.dropbox.com/s/y042q9otmhv6jlh/wordpress%20wont%20embed.mp4?dl=0

    If I Paste the link, I get the little image embedding icon but then it reverts to text.

    If I use [embed] tags I see an error when I Save Draft and only a link when I publish. I have disabled all plugins and have tried this with TwentyFourteen active (not shown in the video)

  29. kristifof
    Member
    Posted 9 months ago #

    I made the switch to WP YouTube Lyte plugin and I'm not having issues anymore (and it doesn't weight the website down quite as much).

    I found out though that one of the caching plugins was sometimes breaking the links that the embed code was using, so the problem could be linked to another plugin you are using disrupting the code.

  30. Abcmoteur
    Member
    Posted 9 months ago #

    FYI, I have absolutely nothing changed and now it works!
    This is incomprehensible!

Topic Closed

This topic has been closed to new replies.

About this Topic