WordPress just released version 6.8, and it came with something new called speculative loading.
It sounds fancy—but don’t worry, I’ll explain everything in plain English. And I’ll show you how to turn it off in just a few simple steps. Let’s go! 👇
🤔 What Is Speculative Loading?
Imagine someone is visiting your website. WordPress now tries to guess what page they’ll click on next…
Then it starts loading that page in the background, even before the visitor clicks it!
✅ Why WordPress thinks it’s helpful:
- It makes the next page load really fast.
- It feels super smooth for the visitor.
❌ Why you might want to turn it off:
- If you’re using a cheap hosting plan (like shared hosting), this guessing game uses extra power.
- That can slow down your site or even make it crash if too many people visit at once.
So if you want your site to stay safe and not overwork your server, you might want to turn this feature off.
🛠️ How to Turn It Off (No Coding Skills Needed!)
We’re going to use a free plugin called Fluent Snippets. This plugin lets you add little bits of code to your site without breaking anything.
Here’s the step-by-step:
- Go to your WordPress dashboard (that’s the main screen where you manage your site).
- Click on Plugins → Add New.
- Type “Fluent Snippets” into the search bar.
- Click Install and then Activate it.
- Once it’s ready, click Create New Snippet inside the plugin.
- Choose Functions PHP as the type.
- Paste this tiny code: phpCopyEdit
// Disable Speculative Loading
add_filter('wp_speculative_loading_enabled', '__return_false');
remove_action('wp_head', 'wp_output_speculationrules_script');
add_action('template_redirect', function () {
ob_start(function ($html) {
return preg_replace('/<script type="speculationrules">.*?<\/script>/s', '', $html);
});
});
- Tell it to Run Everywhere.
- Give it a name like “Turn Off Speculative Loading.”
- Click Create Snippet, then Activate it.
🎉 That’s it! You’ve turned off speculative loading on your site.
🔁 Want to Turn It Back On Later?
No worries! Just go back into the plugin, find the snippet, and click Deactivate.
That’s like flipping a switch—WordPress will start using speculative loading again.
🎯 Final Thoughts
Speculative loading can make websites faster—but sometimes it causes problems on smaller or busy websites.
The good news? You can turn it off with just a few clicks, using a safe and free plugin. No need to touch any scary code!
📦 Bonus: Helpful Links
- 🔗 Fluent Snippets Plugin – WordPress.org
- 📖 What’s New in WordPress 6.8 (Video)
- 💡 How to Speed Up Your WordPress Site Safely
Have any questions or got stuck on a step?
Leave a comment or reach out—I’m always happy to help 😊
And if this was helpful, feel free to share it or check out my YouTube channel for more easy WordPress tips!
Leave a Reply