Support » Localhost Installs » Embed Video Not Displaying Consistently

  • Resolved activecoder


    Hi, I have a WordPress 5.5.1 running on http://localhost:8080 with PHP 7.4.10.

    I see a strange behavior with just simple embed video, and can use some help.

    I created a Post with a YouTube Block (also tried with Embed URL Block, or [embed] shortcode but they all have similar result) that suppose to embed a video. (Example link: But when I preview or publish the Post, I only see the URL, not the embedded video.

    What’s more strange is that, when I revisit the same page few hours later, I can see the embedded videos! But then as soon as I modify the Post, the video will not display again.

    I also tried the same on instance, but there has no problem with embed video. I can preview/publish immediately. So it seems only happens when I run WP in localhost instance. Is this expected behavior? Has anyone face the same issue?

    Much Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @activecoder,

    I’ve experienced the same issue using and possible sites too.

    I usually add the YouTube embed code to an HTML block using the Gutenberg editor or to text editor of the Classic Editor. That’s always worked for me.

    I recommend adding the embed code from YouTube as follows:

    • Click on the Share button below the video
    • Click on Embed
    • Click Copy
    • Then paste the code you just copied into a custom HTML block in WordPress using these instructions
    Thread Starter activecoder


    Thanks @nm1com for the workaround! Yes Custom HTML Block seems to work for me too. (However I have trouble controlling the embed size when using it though.)

    I also discovered that these issues are only happening on the default TwentyTwenty theme. When I switched to a more simpler Theme (eg: Hostmarks), then all the embed Blocks seem to work just fine. Even the Custom HTML Block has no sizing issue. So perhaps this is the default theme issue only?

    You’re welcome!

    It’s possible that there’s a plugin conflicting with the TwentyTwenty theme.

    Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable the plugins one by one to identify the source of your troubles.

    If you can install plugins, install and activate Health Check:
    It will add a new feature under Tools > Site Health.
    On its Troubleshooting tab, you can Enable Troubleshooting Mode. This mode will disable all plugins, switch to a standard WordPress theme (if available), allow you to turn your plugins on and off, and switch between themes, without affecting normal visitors to your site. Following these steps allows you to test for various compatibility issues.

    There’s a more detailed description about how to use the Health Check plugin and its Troubleshooting Mode at

    If you’d like to find out whether others are having this issue, you could try asking on the theme’s support forum found here:

    Thread Starter activecoder


    Great recommendation on “Health Check”. Very useful in debugging with clean WP without affecting live site! I will keep all these in mind. Thanks again @nm1com !

    You’re very welcome @activecoder!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Embed Video Not Displaying Consistently’ is closed to new replies.