-1

I've a trouble with oEmbed integration for YouTube on hosting server. I've a Wordpress site that is exactly the same on my localhost (MAMP 3.0.7.3 on MacOSX with PHP Version 5.6.2) and my distant serveur (LAMP with Apache2 and PHP Version 5.6.17-0+deb8u1).

On the localhost, when I paste an URL from Youtube the frame appear but not on the hosted version, where I've this response : {"success":false,"data":{"type":"not-embeddable","message":"<code>https:\/\/www.youtube.com\/watch?v=luvQwgRZ9bo<\/code> n&rsquo;a pas pu \u00eatre int\u00e9gr\u00e9."}}

The commun troubleshooting (like change theme or disable plugin) have no effect.

Maybe oEmbed need Apache2 mod or dependencies to work ? In this case I having ssh access to this server.

Could you, please, help me?

  • In my opinion, the URL you are using is malformed for embedding. Try to use URLs looking like this one: https://youtu.be/luvQwgRZ9bo. Also you can try to use non-SSL (change https to http). – Max Yudin Mar 15 '16 at 16:15
  • This has nothing to do with wordpress, the URL in the error seems ok, so the "problem" has to be on youtube side – Mark Kaplun Mar 15 '16 at 16:17
  • Nothing change. Short or long version, SSL or not.. – mthchz Mar 15 '16 at 16:18
  • @MarkKaplun with exactly the same WP site, oEmbed WORK fine on localhost and NOT WORK on distant host. It can't be Youtube side. – mthchz Mar 15 '16 at 16:25
  • @mthchz, you can't have it both ways, if the sites are identical then the issue is with youtube. If they are not, then the question is pointless as you didn't tell as in what way they are different – Mark Kaplun Mar 15 '16 at 16:42
1

It's a missing configuration on the apache hosts file which cause troubles on serveur 'self call'. For exemple, if serveur is using domain.com, I've a timeout when I typing curl domain.com with shh.

Adding 127.0.0.1 domain.com in /etc/hosts file and it's work !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.