The latest iteration of the widely used Yoast SEO plugin, version 27.8, introduces a suite of performance optimizations designed to significantly improve loading times across its various functionalities, with a particular focus on large-scale websites boasting extensive numbers of posts and users. This release underscores Yoast’s long-standing commitment to delivering efficient, high-performing software that minimizes server overhead and ensures a swift user experience, a critical factor for the millions of websites that rely on the plugin for their search engine optimization needs.
Yoast SEO, a cornerstone for WordPress users aiming to boost their search engine visibility, is installed on an estimated 13.7% of all websites globally, representing millions of diverse online platforms. This vast user base, ranging from small personal blogs to large enterprise sites with complex databases, presents unique challenges for plugin developers. Ensuring optimal performance across such a varied ecosystem necessitates continuous review and refinement of code. The 27.8 release is a direct result of one such targeted review, where developers meticulously identified and re-engineered features whose behavior at scale offered the most substantial opportunities for improvement. The enhancements span from modifying database queries to accelerate page loading for sites with numerous users and streamlining heavy operations within the WordPress administration area for sites rich in content, to reducing redundant database roundtrips for multiple features and implementing general performance best practices. This holistic approach aims to elevate both the user and developer experience within the Yoast SEO plugin.
A History of Performance Commitment
Yoast has a documented history of prioritizing performance, recognizing its pivotal role in both user satisfaction and search engine rankings. Previous initiatives, such as substantial improvements to their database system, demonstrate a consistent dedication to optimizing the plugin’s footprint and operational speed. This ongoing commitment reflects an understanding that even minor inefficiencies, when scaled across millions of installations, can lead to significant cumulative overhead for web hosts and slower experiences for website administrators and visitors alike. The 27.8 release builds upon this foundation, strategically targeting areas where performance bottlenecks were most pronounced in large, data-intensive environments.
Key Optimizations and Technical Deep Dive
The development team focused on several critical areas, leveraging deep technical insights to implement changes that deliver tangible speed benefits. These optimizations primarily revolve around more efficient database interactions, a common source of performance degradation in large WordPress installations.
Significantly Reduced Loading Times for Root Sitemaps on High-User Sites
One of the most impactful changes addresses the generation of the root sitemap, a crucial component for search engine crawling and indexing. Previously, for Yoast SEO to accurately calculate the ‘Last Modified’ value of the author sitemap within the root sitemap, it had to process the usermeta data for all eligible users. This calculation traditionally involved checking user capabilities, specifically by adding the 'capability' => ['edit_posts'] argument to the get_users() call. This method triggered an exceptionally heavy database query, characterized by multiple JOIN operations that often bypassed database indexes.
The resulting query included a complex AND clause with multiple LIKE '%"..."%' conditions:
AND ((((mt1.meta_key = 'wp_capabilities'
AND mt1.meta_value LIKE '%"edit\_posts"%')
OR (mt1.meta_key = 'wp_capabilities'
AND mt1.meta_value LIKE '%"administrator"%')
OR (mt1.meta_key = 'wp_capabilities'
AND mt1.meta_value LIKE '%"editor"%')
OR (mt1.meta_key = 'wp_capabilities'
AND mt1.meta_value LIKE '%"author"%')
OR (mt1.meta_key = 'wp_capabilities'
AND mt1.meta_value LIKE '%"contributor"%')
OR (mt1.meta_key = 'wp_capabilities'
AND mt1.meta_value LIKE '%"wpseo\_manager"%')
OR (mt1.meta_key = 'wp_capabilities'
AND mt1.meta_value LIKE '%"wpseo\_editor"%'))))
Such LIKE '%...%' clauses are notoriously inefficient in MySQL because they prevent the use of B-tree indexes. Consequently, MySQL had to perform full table scans on relevant wp_capabilities rows, executing seven substring scans of the serialized PHP meta_value per row. This process could take an inordinate amount of time on sites with a substantial user base.
The Yoast development team ingeniously modified this calculation. Instead of relying on capability checks, the plugin now identifies eligible users by looking for those with published posts, utilizing the 'has_published_posts' => true argument. This subtle but profound change instantly transforms the underlying query into one that effectively leverages database indexes, leading to dramatically improved performance. In internal testing on a site with approximately two million users, the time required to complete this query – and by extension, the rendering time of the root sitemap – plummeted from over 300 seconds to a mere 25 milliseconds. This represents an astonishing reduction of over 99.9% in loading time, showcasing the potential for drastic improvements on similarly large sites. Critically, this change is expected to have no negative impact on the feature’s functionality, as the 'has_published_posts' => true argument was already incorporated in a later stage of sitemap generation.
Reduced Loading Times for Author Sitemaps
Building on the sitemap optimization efforts, the 27.8 release also addresses performance bottlenecks in generating author sitemaps on sites with numerous users. Beyond the general optimization for eligible user calculation, developers discovered an additional, unnecessary meta query that checked if each user’s user_level was greater than 0. This particular check, which added an INNER JOIN to the query, was identified as a remnant from an older WordPress framework.
The user_level framework has been deprecated by WordPress core since version 3.0, released in 2010. While its inclusion didn’t break the sitemap feature, it contributed to performance degradation by adding an unneeded INNER JOIN on sites with very large user and usermeta tables. The redundant JOIN looked like this:
INNER JOIN wp_usermeta AS mt1 ON wp_users.ID = mt1.user_id
...
AND ( mt1.meta_key = 'wp_user_level' AND mt1.meta_value != '0' )
Recognizing the deprecation and the performance cost, Yoast made the deliberate decision to drop support for this outdated framework. This removal streamlines the query, making the author sitemap generation smoother and faster. Given the age of the user_level deprecation, the company anticipates minimal disruption from this optimization, reinforcing its commitment to modern, efficient code.
Preventing Unnecessary Expensive Database Queries in Admin Pages
The administrative backend of a WordPress site, particularly on larger platforms, can often suffer from periodic slowdowns due to background processes. Yoast SEO previously ran a database query daily while administrators navigated the backend. This query’s purpose was to notify admins about pending actions required for optimal indexing of site data within Yoast’s internal storage. For substantial sites, this query could execute for several seconds, noticeably slowing down the rendering of admin pages.
The specific function, Limited_Indexing_Action_Interface::get_limited_unindexed_count(), was responsible for complex queries like:

SELECT Count(P.id)
FROM wp_posts AS P
WHERE P.post_type IN ( 'post', 'page' )
AND P.post_status NOT IN ( 'auto-draft' )
AND P.id NOT IN (SELECT I.object_id
FROM wp_yoast_indexable AS I
WHERE I.object_type = 'post'
AND I.version = 2)
These queries, running periodically in the admin area, were a significant drag on performance. The Yoast team re-engineered the logic for this notification system. Instead of daily or even more frequent execution (once every 15 minutes on very busy sites), these heavy queries now run only once, specifically when the notification is first determined to be necessary. This change effectively caches the results of Limited_Indexing_Action_Interface::get_limited_unindexed_count(), leveraging existing cache invalidation mechanisms that were previously underutilized. As a result, a potentially very heavy database query is now triggered only once in most sites, dramatically improving the responsiveness of the WordPress admin interface.
Optimizing Expensive Database Queries in Admin Pages
Beyond simply preventing repetitive execution, Yoast also optimized the heavy database query itself. This optimization provides an additional layer of speed improvement, making the SEO optimization tool significantly faster on sites with a large number of posts.
The original query structure used an AND P.ID NOT IN (subquery) clause:
AND P.ID NOT IN (
SELECT I.object_id FROM wp_yoast_indexable AS I
WHERE I.object_type = 'post'
)
This NOT IN subquery construction can be inefficient because it often requires the database to build the entire list of object_ids from the subquery before evaluating the NOT IN condition. The optimized query now uses an AND NOT EXISTS (subquery) clause:
AND NOT EXISTS (
SELECT 1 FROM wp_yoast_indexable AS I
WHERE I.object_id = P.ID
AND I.object_type = 'post'
)
The NOT EXISTS clause is generally more performant for such scenarios because it "short-circuits" the moment a matching row is found in the subquery, eliminating the need to process the entire list. This change results in considerably faster query execution on sites with thousands of posts, directly contributing to a snappier SEO optimization experience.
Reducing Database Roundtrips
A fundamental principle of database performance optimization is to minimize roundtrips between the application and the database. Each roundtrip incurs overhead, even for small data retrievals. Yoast’s performance review identified instances where the plugin was retrieving data for multiple posts through a series of sequential SELECT queries, rather than a single, more efficient batched query.
For example, a code snippet that looked like this:
$indexables = [];
foreach ( $post_ids as $post_id )
$indexables[] = $this->repository->find_by_id_and_type( (int) $post_id, 'post' );
was refactored to perform a single batched query:
$indexables = $this->repository->find_by_multiple_ids_and_type(
array_map( 'intval', $post_ids ),
'post',
);
This transformation means that for a batch of 1000 posts, instead of initiating 1000 separate SELECT queries (each yielding a maximum of one row), the plugin now performs just one SELECT query that can return up to 1000 rows. While care was taken to ensure that the number of requested posts in a single batch does not exceed MySQL’s usage limits, this optimization leads to significant savings in database interactions. For instance, sites with 1000 posts can save up to 960 database roundtrips for operations such as parts of their SEO optimization or the output of the schema aggregation feature. This reduction in database calls directly translates to faster processing times and reduced load on the database server.
Improved Post Editor Performance by Preventing Unnecessary Re-renders
Beyond server-side and database optimizations, Yoast also addressed client-side performance within the WordPress editor. The WordPress editor, particularly with its React-based components, can suffer from unnecessary re-renders of plugin sidebar panels. These panels, including Yoast’s, typically re-render when the data they pull from the store appears to have changed. However, "appears to have changed" is often determined by reference equality (===) in JavaScript, not by a deep comparison of values. If a selector returns a fresh object literal like items: ['foo'] each time, even if its content is identical, React perceives it as a new object and triggers a re-render. In a busy editor environment where state updates are dispatched with every keystroke, this can lead to constant, unneeded re-renders of Yoast’s panels, degrading the editor’s responsiveness.
With the 27.8 release, Yoast developers identified and patched multiple instances where data that hadn’t genuinely changed was inadvertently triggering these superfluous re-renders in the post editor. By ensuring that components only re-render when their underlying data has truly been modified, the editor integration becomes significantly more robust and performant, providing a smoother content creation experience for users.
Broader Implications and Industry Impact
The cumulative effect of these optimizations in Yoast SEO 27.8 extends far beyond just quicker loading bars. For website administrators and content creators, the improvements translate into a more fluid and less frustrating experience within the WordPress dashboard. Faster sitemap generation means that search engines like Google can more quickly discover and index new or updated content, potentially leading to faster visibility in search results. Reduced load on the database and server resources can lead to tangible cost savings for hosting providers and website owners, especially those on shared hosting plans or with high-traffic sites.
From a developer perspective, these changes exemplify best practices in software engineering – prioritizing efficiency, understanding database mechanics, and optimizing for scale. Yoast’s public sharing of these technical details also contributes to the broader WordPress and web development community by raising awareness about performance best practices and demonstrating concrete solutions to common challenges.
The ongoing commitment by Yoast to performance optimization highlights a crucial trend in the digital landscape: speed is paramount. As user expectations for instant access grow and search engines increasingly factor page speed into their ranking algorithms, plugins that can deliver robust functionality without compromising performance become indispensable. The Yoast SEO 27.8 release is a testament to this principle, reinforcing its position as a leading solution for WordPress SEO while simultaneously setting a higher bar for plugin efficiency within the ecosystem.






