WordPress 6.1, arriving November 2022, is jam-packed with performance improvements, signaling that this may be the update that many have been waiting for.
WordPress performance scores from the beginning of 2022 until the end of September have been relatively stable, going up a few percentage points in the spring then dropping in the summer, ending September roughly 3 percentage points higher than from the start of the year.
WordPress Core Web Vitals Performance in 2022
Most other platforms have enjoyed more substantial performance improvements month after month in 2022:
- Wix up by 13 points
- Duda up by 8 points
- Squarespace up by 7 points
- Joomla up by 7 points
- Drupal up by 5 points
WordPress publishers hoping for performance improvements had little good news this year.
But that’s about to change in a big way.
WordPress 6.1 comes packed with substantial improvements, some of which are referred to as “massive.”
“Massive Improvement” To WP_Query Performance
An important performance boost is the addition of caching to WP_Query in the database.
What that means is that every time a visitor requests a webpage that request will remain in a cache, a memory of what was retrieved from the database.
When another visitor requests the same webpage, instead of making another request to the database WordPress will instead retrieve the webpage data from the cache (memory) instead of retrieving (making a query) from the database. That results in faster performance.
The WordPress core contributor who worked on this improvement recently tweeted:
“In WordPress 6.1, there is a massive improvement to database performance.
Database queries in WP_Query are now cached.
A ticket I have been working on for 5+ years was merged.
This should result in billions of less repeated database queries”
Improvement to REST API Database Queries
When a webpage is requested, the webpage will make different requests for various components of the page. This improvement streamlines that process by reducing the number of database queries (requests for parts of a webpage).
“When running profiling tools against the responses of REST API requests, it was discovered that post controllers request a lot of linked data to each post.
For example, when returning a post in a REST API response, linked data such as author (user), featured image, and parent post were all requested.
As these linked items were not primed in caches, it could mean that for each post in the REST API response there would be 3 separate database queries: one for the user, one for the featured image, and another for the parent post.
In WordPress 6.1 all the caches are primed in a single database query “
Additional Caching Improvements
There are other cache related improvements that speed up the delivery of webpages.
Improvements to Cache API
These are a couple of improvements.
In simple terms, one improvement that is called “Check cache key types” addresses a problem created by plugins.
This fixes an issue that causes a failure that can result in slightly weird behavior or outright failure.
This improvement makes it easier for plugin developers to notice the problem.
The developer notes on this fix states:
“This commit introduces a quick type check on the given cache keys and adds a _doing_it_wrong() message that should help plugin developers to notice these issues quicker.”
The second improvement is called, Remove `@access private` from cache priming functions.
A plain English explanation for this improvement is that it provides theme and plugin developers the opportunity to access and use certain functions that will result in less database queries which in turn will speed up site performance.
Post, Post Types Improvements
Improves performance for websites with a large amount of custom taxonomies (like tags and categories).
Reduces database queries in multisite environments.
Media Handling Improvement
This is a performance boost from how images are deferred in order to keep them from slowing webpage retrieval and display, resulting in performance boosts.
WordPress describes it like this:
“Recently I have been playing around with another special attribute to the img tag which is basically decoding=”async”.
After implementing async decoding to the images in a page, the page load became, even more, faster and images are decoded asynchronously by the browser, loading the contents almost instantly and also reducing page render time. This is a huge performance booster to any webpages which has a lot of images (so basically most sites).”
Improved PHP performance for Core Blocks Registration
This improves how “block registration” is handled. This is an improvement to how block are identified and handled.
WordPress describes it:
“…reduce filesystem reads and processing of block.json files, which should benefit all WordPress sites and improve performance…”
New Site Health Checks
WordPress 6.1 comes with two new site health checks. While this isn’t a performance improvement itself, it does help publishers identify whether they can improve their site peformance with the use of a Persistent Object Cache and/or a Full Page Cache.
Persistent Object Cache
The Persistent Object Cache holds frequently requested webpage parts in a cache (in memory), speeding up the display of a webpage and reducing server load.
Full Page Cache
A Full Page Cache is a cache of the entire webpage, essentially making a webpage behave more like a static HTML page. A full page cache is generally not useful on a site that is dynamic and contains personalization.
This seems like kind of a bug fix but it’s also an improvement to wp-cron.php, which is a task scheduler for things like backups, scheduled posts or updates.
The update will speed up performance by making it compatible (again) with LiteSpeed Web Server plus LSAPI. Technical details here.
Many More Performance Improvements
There are many more performance improvements but the above listed updates are the most notable.
I addition to performance improvements, WordPress 6.1 will also arrive with improvements to accessibility, the block editor, more flexibility and options for theme developers, updated external libraries to latest versions, new functions, new filters and even a new oEmbed provider for podcasts.
Updates are generally incremental but WordPress 6.1 is shaping up to be a fairly substantial one, look for it to be released on November 1, 2022.
Featured image by Shutterstock/Ljupco Smokovski