Tips

Videos Not Working in WordPress


Context

On one of my WordPress sites, I wanted to add a self-hosted video to my page.

Problem

In the admin interface, via Elementor, the video stayed at 0 seconds with a black screen and wouldn’t play.

In the user interface, on my page, it was the same, but even worse, the page kept loading in a loop.

You might think the problem came from my video, but it actually happened with all of them, even ones that worked fine on other pages of my site.
So it can’t be that.

Maybe the video URL is wrong then? The behavior is weird, but in the “Media” section of the admin interface, the videos displayed fine.
However, putting the URL of that same video in a separate tab to test it didn’t work.

A permissions problem then? No, I checked carefully, it’s not that.

Solution

I figured WordPress must have a bug somewhere, so I simply restarted it and…
it worked.