• Skip to primary navigation
  • Skip to main content
  • Skip to footer

WPJohnny

WordPress Performance Guides and Reviews

  • Start a WordPress site
  • Hosting
  • Themes
  • Plugins
  • Blogging
  • Marketing

Youtube embed not working in WordPress editor (affecting datacenters globally)

WordPress hosting Dec 13, 2019 by Johnny

PSA: Youtube is blocking auto-embed requests from many datacenters globally. (Our Singapore datacenter being one of them.)

If you’ve been having issue with auto-embed pasted Youtube urls into your editor, it’s not your site or even your web-server.

We have a few mitigation tactics for this issue. (Will also update this if we think of others.)

This issue is happening with many datacenters and VPS providers in the past week or so (globally). Youtube is blocking requests from many networks due to “suspicious activity”. I think they’re trying to cut down on bots but accidentally blocking legitimate requests (like WP embed).

Many people have noticed that they seem to be blocking on ipv6. So if you force all requests through ipv4, that seems to do the trick. Alternatively, you could also ask for your own ipv6 address block (which our datacenter was happy to provide). But be careful, it might affect other services on the same server.

In any case, I suspect our datacenter is probably already trying to get it handled and unblocked due to many other clients already complaining as well.

Possible workarounds/solutions:

functions.php snippet
add_action( 'http_api_curl', function( $curl_handle ) {
curl_setopt( $curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
});

  1. Try the code hack above! Paste that into your theme functions.php.
  2. You can still use the embed Youtube videos MANUALLY. The auto-embed function doesn’t work, but pasting in the html embed code manually still works. (Of course, it’s not ideal because of height/width but perhaps you can pick a wider width which is then downsized in mobile). This might be ok while we wait out an update from our datacenter.
  3. Managed hosting clients can be temporarily moved to our Australian server. And then even move you back later if need be. Australia to Singapore is only about 100ms extra DNS time.
  4. Dedicated VPS clients can be switched to a new IP. Unfortunately, mass ranges of IP’s are blocked. So we’ll have to try swapping and swapping until we get one that works. (Don’t worry, we’ll handle that work for you.)
  5. Disabling ipv6 – this is something we will play with but I think it won’t be necessary.

In the meanwhile, you should check your older posts to see if their Youtube embeds stop working. Also…enabling or disabling Cloudflare proxy doesn’t help. It’s a datacenter issue.

Reference links:

  • https://wordpress.org/support/topic/embeds-not-working-on-all-websites/

Share this post:

Share on FacebookShare on X (Twitter)Share on LinkedInShare on WhatsAppShare on EmailShare on SMS

Read all my posts on WordPress hosting

About Johnny

Right on the edge of WordPress development! 10+ years of WordPress design, development, hosting, speed optimization, product advisor, marketing, monetization. I do all that.

More WordPress Guides

Caudabe iPhone protective case review

Why is Gutenberg being pushed now (when it’s not perfect)

What’s a CDN? (Content Delivery Network) And do you need it?

CyberPanel cheatsheet (configs, commands, fixes)

Quick thoughts on CSS Scan

Affinity design software review

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer

More links

  • Gadget reviews
  • Try my free WPJ plugins
  • Join the WPJ FB Group
  • WPJ YouTube & newsletter
  • Become a WPJ Affiliate

Popular Reviews

  • Best WordPress Hosting
  • Best WordPress Themes
  • Best WordPress Plugins
  • Best WordPress Cache Plugins

Services

  • Speed optimization
  • Speed optimization courses
  • WordPress hosting
  • Hire me or other experts
  • Client login

About Johnny

10+ years of WordPress design, development, hosting, speed optimization, marketing.
Contact me.

newsletter block

Copyright 2025 | WordPress guides by Johnny Nguyen

Click to Copy