We’ve created the fastest related posts ever

When we say “related posts for WordPress“, we say “bad performance”. Without using an external service like ElasticSearch, it’s practically impossible to have related posts work fast in WordPress. That’s why we’ve always stayed away from including any related posts plugin on our site. It’s also the reason we haven’t tried to come up with a solution ourselves before. In the upcoming release of Yoast SEO Premium, this will change. We found a way to have blazing fast related posts! Let me explain how we did that.

The fastest related posts ever

Our solution has a frontend and an admin component. Let me start by asking a very simple question:

On a content page, what would be the fastest implementation of related posts you could think of?

The (somewhat dull) answer:

Simple, old-fashioned links.

You simply don’t need to generate related posts, if you already link to your related content in your text. Not only is this better for frontend performance, it also benefits SEO. It’s simply better to link directly to your related content in a meaningful context, than to use a generic related posts box somewhere else on your page.

Of course this is easier said than done. The real problem related posts widgets solve is that you no longer have to think about related content yourself. So yes, we still need an algorithm to suggest related content, we just don’t need it on the frontend. Instead, we need to bring this functionality to the editor. This way, we can suggest the writer of an article which related posts he/she might want to link to in their text. We call these *internal linking suggestions*.

Why suggesting related content is costly

So, I guess we haven’t gotten rid of the problem of generating related content in a performant way. The thing we can’t seem to get around, is that we’ll have to do one, or more, very heavy queries to the database at some point. To suggest related links, we need to compare the content of one post with that of all the other posts on our site. The WordPress database isn’t optimized for such queries though. To do this in one operation is costly, and in case your site has a lot of content, that may slow things down substantially.

Indexing content, one post at a time

About a year ago, we moved our content analysis from the server side to the browser. This had a lot of advantages, but a slight inconvenience was that we could no longer calculate the SEO score for a post on the server. This calculation now has to be done in the browser for each post separately. This way we’ve already managed to dramatically improve server side performance with regard to our content analysis tool. When we started thinking about our prominent words algorithm, we realized this would also allow us to easily index content. Saving the most prominent words of every post to the server would make it very easy and cheap to query related content.

Continuous improvement

By leveraging our content analysis tool and utilizing the processing power of the browser to index content, one post at a time, we’ve managed to drastically reduce the heaviness of the queries needed to find related content. Now, we haven’t run any benchmarks yet, but it’s clear that this solution is much faster and easier to scale, without taking any serious performance hits.

In Yoast SEO Premium 4.0 – launching soon! – we’re shipping the first version of our internal linking suggestions tool. We’ll continue tweaking the algorithm to make sure our internal linking tool is the best and most performant related content tool available for WordPress.

Read more: Related posts need to make sense, not just be there »

Free: WordPress for beginners training

  • Find out how to set up your own WordPress site
  • Learn everything about creating and maintaining a WordPress site
  • Plus: learn all about WordPress, like its history and its open-source community
  • Free online & on-demand training by Yoast
More info

32 Responses to We’ve created the fastest related posts ever

  1. john jameson
    john jameson  • 3 years ago

    I have a main website in PHP and a large blog at mainsite.com/blog
    Will this plug in suggest inks to the main site as well as the wordpress area?

    • Omar Reiss

      Hi John, it won’t. It uses the WordPress REST API to index content and suggest links from within WordPress. The link suggestion tool won’t be able to suggest content that sits outside of WordPress.

  2. Srinvasa Chaitanya
    Srinvasa Chaitanya  • 3 years ago

    Right Now, I am using the Related Posts By Taxonomy Plugin by keesiemijer which have a negligible impact on my site load time. It is a bit difficult for large sites to attach links to related articles in the post.

    Your Fastest related post feature comes only with the premium version. Time to switch from the free version ;)

  3. Margaux
    Margaux  • 3 years ago

    Oh, this is what I’m waiting for, it’s nice to hear that you can help us with our internal links.

  4. Sofie
    Sofie  • 3 years ago

    How will it perform for bilingual site? My issue with all existing related post plugins has always been that they are not compatible with WPML and thus recommend Dutch content on the English version of my site and vice versa.

    So far, I feel that adding in related content links myself works best.

    • Omar Reiss

      We haven’t tested this extensively with WPML yet, but I expect our algorithm to perform quite well for multilingual setups out of the box. One of the big advantages of our approach is that you still actually have to do the linking manually. We just give you a list with suggestions so you don’t have to go looking for the related content yourself. That way you can already be sure you are not going to present any false positives to your visitors, since you are still the one deciding which links to add.

      If you’ll find our link suggestions contain a lot of links to content in different languages, please let us know. We have friends over at WPML that can help us integrate better.

  5. Anvar Jamal Saifi
    Anvar Jamal Saifi  • 3 years ago

    So the new feature is just gonna be on the premium version?

    • Omar Reiss

      Yes, this will be a Premium-only feature.

  6. Schzone.com
    Schzone.com  • 3 years ago

    Wow, so wonderful….

    I hope to see the version 4 very soon.


  7. Kenny Williamson
    Kenny Williamson  • 3 years ago

    This would actually be a good reason go premium. Just a bit wary of tying in too much into one company.
    My actual question is also… what about e commerce uses. Related products and so forth… what thought process has been put into that?

    • Omar Reiss

      We haven’t optimized specifically for eCommerce usage yet. But I can imagine it could be useful to customize this a bit for products or even other post types. Maybe you’d specifically want to have product link suggestions instead of generic link suggestions. I’ve created an issue on our Premium issue tracker to look further into this. If you have ideas yourself or other feedback, I’m happy to hear you out!

  8. Vy Spirit
    Vy Spirit  • 3 years ago

    Great, now I do not need any more external plugins.

  9. Andy Miller
    Andy Miller  • 3 years ago

    I use the MicroKid’s Related Posts Plugin which, unfortunately is old and no longer supported. I had wondered if this might be the replacement, but I think I’m going to stick with it at least for now. I agree that manually-chosen related posts are better than automatically-generated, but I like to be able to have the links in a widget in the sidebar as well as at the end of the post.

    Now if you could come up with a way to replace the MicroKid plug-in without having to rebuild the the existing lists of related posts …

    • Steven Spiller
      Steven Spiller  • 3 years ago

      Thanks for that Andy! I have been looking for the only Related Posts plugin I previously found to have a negligible impact on performance. Couldn’t remember it’s name.

      It might need a little bit of TLC, but it seems to work as intended.

  10. Patrick Dankers
    Patrick Dankers  • 3 years ago

    While I applaud this, in what way will this be more beneficial then using ‘Related Posts for WordPress Premium’ like also mentioned by Seth.

    Any feedback on that matter would be greatly appreciated for sure.

    Besides that keep up the great work :)

  11. Paul Wright
    Paul Wright  • 3 years ago

    Cool, I just bought Yoast SEO Premium on cyber Monday, does this mean I get it in the upgrade. This sounds awesome so I don’t have to use YARPP?

    • Omar Reiss

      If you have activated your license, you will be able to update from your WordPress backend as soon as 4.0 is released!

  12. James Artre
    James Artre  • 3 years ago

    Wonderful news!

    I was hoping you would get around to adding this feature!

  13. Quentin Moore
    Quentin Moore  • 3 years ago

    The related post functionality looks like a very compelling feature for anyone considering Yoast SEO premium. I can’t wait to try it.

  14. Nathan K Smith
    Nathan K Smith  • 3 years ago

    Will this work with Wpengine hosting? I know they don’t allow the following because they are database intensive.

    Dynamic Related Posts
    SEO Auto Links & Related Posts
    Yet Another Related Posts Plugin
    Similar Posts
    Contextual Related Posts

    • Omar Reiss

      I see no reason why it wouldn’t. Our solution is far less database intensive than any related posts plugin out there. On top of that, it will only query the database when editing a post instead of on every post visit.

  15. Seth
    Seth  • 3 years ago

    Didn’t you guys used to have a working relationship with Related Posts for WP (https://www.relatedpostsforwp.com/) and their team? I’ve used it for a couple of years with great success, and I thought it was on your recommendation.

  16. Hayk
    Hayk  • 3 years ago


    Please do this possibility for a free version, though with limited functionality to at least read it and how it works

    • Omar Reiss

      Unfortunately we don’t offer free trials yet. We do however offer a 30-day Money Back Guarantee & Refund Policy (https://yoast.com/refund-policy/) for all of our Premium plugins. You could try Premium and see if this functionality is valuable to you. You’ll also have the other benefits of going Premium. You can read more here: https://yoast.com/wordpress/plugins/seo/

  17. Jacco
    Jacco  • 3 years ago

    That would be awesome and most likely a reason to upgrade. Will you include something like a limited trial for the free users, just to be sure it works properly?
    Thanks, Jacco

    • Omar Reiss

      We are thinking about introducing free trials next year. Can’t make you any promises though as I don’t know when we’ll be ready for that. Currently, I can only refer you to our 30-day refund policy: https://yoast.com/refund-policy/.

      • Autos
        Autos  • 3 years ago

        Great Omar.. i have bought yoast seo premium,,

  18. Dimitri Mitja
    Dimitri Mitja  • 3 years ago

    Very insightful, keep up the good work!

  19. EsDiari.com
    EsDiari.com  • 3 years ago

    Now that sounds really interesting.

    For sure it will save us tonnes of time when searching for relevant content to link to within our own local paper that holds over 18.000 articles.

    Great job ;)

  20. Derek
    Derek  • 3 years ago

    I am going to like this new tool in the premium version. Anytime I can remove 1 bloated plugin and use an existing plugins new features is a good thing for me.

    I do the linking thing but sometimes I am clueless and need some help. Hopefully 4.0 helps me out. I just have to wait and see when the rollout happens what I shall do.

  21. brian hillier
    brian hillier  • 3 years ago

    Simple old fashioned links work best every time as you say.

    I have the 1 to 5 Premium at the moment and will definitely upgrade further for my other websites if this works well – and i know it will!

    Thank you.

  22. Adam H
    Adam H  • 3 years ago

    Oh sounds awesome, I’d hate to think how much time is spent thinking of previous content to link to. This could be the deciding factor to go premium on a couple of sites.