Web Hosting

WordPress 7.2 Random Endpoint: What It Could Cost Your Hosting

Empty server racks in a data center, a stand-in for the load behind the WordPress 7.2 random endpoint

As of 2026-11-16 UTC, according to the core dev note Your Content Is Going To Get More Random!, published on November 5, 2026, WordPress 7.2, due on 8 December 2026, will include a built-in /random/ URL that redirects visitors to a randomly chosen published post. The change has drawn a long comment thread with many objections.

For a personal blog, a random-post link is a minor novelty. For a business site, an online store, or a membership platform on shared hosting, the same feature changes what kind of traffic a server may have to absorb and which content can be reached by a direct URL. This article looks at what the WordPress 7.2 random endpoint could cost and expose, and what to check before the release.

What the WordPress 7.2 random endpoint does

A request to a site’s /random/ URL redirects the visitor to a randomly selected published post. The feature is on by default and is built on WordPress’s existing rewrite, WP, and WP_Query APIs. The random base is also prefixed to existing archive paths. For example, /random/author/jorbin/ redirects to a random post by that author, and /random/{post-type-slug}/ redirects to a random post of a custom post type.

Which content qualifies is controlled by a new randomable argument on register_post_type(). When it is not set, it defaults to true for post types that are publicly queryable and have an archive. Among the built-in types, the standard post is randomable; page and attachment are not. A developer can keep a custom post type out by passing 'randomable' => false when registering it.

Under the hood, the WordPress 7.2 random endpoint runs through WordPress’s main query. Three callbacks are added for the duration of the request, and together they restrict the query to eligible posts, order by RAND(), and limit the result to one row. Because the selection goes through the main query, existing pre_get_posts customizations for an archive also apply to its random version. To change the selection only for random requests, a developer can check the query with wp_is_random_content_query() inside a pre_get_posts callback.

Why it ships on by default, and how to turn it off

The dev note says the feature is on by default and documents a filter to disable it, not a settings-page toggle. When one commenter objected to having no setting, Aaron Jorbin, the dev note’s author, replied that WordPress philosophies mean opt-out options are not added for every feature.

The filter is the documented way to switch the whole WordPress 7.2 random endpoint off. Adding add_filter( 'wp_enable_random_content_redirect', '__return_false' ); in a mu-plugin (a must-use plugin, which WordPress loads automatically without activation) means no random rewrite rules are generated, the random base field is hidden on the permalinks screen, and the random query variable is ignored. To keep individual custom post types out, register them with 'randomable' => false. To exclude other content, use a pre_get_posts callback keyed off wp_is_random_content_query().

The hosting load question: what the numbers show

The dev note itself does not publish benchmarks. The comment thread does. One commenter, Rene Hermenau, tested on a laptop running Docker with 7.2-beta4, PHP 8.3 and MariaDB 11.8 at default settings and no object cache. His posts were fake and about 1 KB each, and he noted that real sites will be slower. He also said an AI coding tool ran the setup and the timings, and that he checked the method and the results.

At 1,000,000 published posts, the random query alone took about 824 milliseconds, and the full uncached /random/ request about 828 milliseconds, against 196 milliseconds for the home page. At 2,000,000 posts, the query took about 1.87 seconds and the request about 1.88 seconds, against 368 milliseconds for the home page. At 50,000 posts the query took about 24 milliseconds. In a further test, 20 requests at the same time on the 2,000,000-post site took 14 seconds to finish, compared with 2.2 seconds for the home page.

The reason is the database query behind the feature. Ryan McCue wrote in the thread that ORDER BY RAND() is notoriously slow in MySQL because it is O(N) across the number of rows in the table. He also described the behaviour as “uncacheable” in the way sites usually offload work, and called it an easy DoS vector for the long tail of sites, while saying he was less concerned about enterprise sites that would simply turn it off.

Not everyone agreed it is a serious problem. Matt Mullenweg questioned in the thread whether this query is a bigger resource exhaustion vector than submitting lots of random search strings via ?s=. On the core side, Aaron Jorbin opened a ticket, #66654, on November 10 to explore improving the performance, especially for extremely large sites. These figures come from one commenter’s laptop test, not an official benchmark, so treat them as an indication of how the query scales rather than a prediction for any particular server.

Commenters also named bots and crawlers as the likely source of repeated requests. One said AI bots are already swarming sites, and another said the endpoint is easy to abuse by crawlers and bots. Shared and budget hosting plans are typically sized around the assumption that most page views are served from a cache and only a small share reach PHP and the database. A WordPress 7.2 random endpoint request that reaches the database each time may work against that assumption, so hosts that already watch slow-query reports or database CPU have a new item to monitor after sites update.

The content exposure question

A second concern about the WordPress 7.2 random endpoint in the comments is which content becomes reachable. Any custom post type that is publicly queryable and has an archive is randomable by default and becomes reachable at /random/{post-type-slug}/. Joost de Valk argued in the thread that core has no way to mark something as “should not be discoverable” without marking it as a draft or giving it a password. The dev note describes the randomable argument and the filter above, and no per-post exclusion field.

A separate caching gap was reported by commenter Rene Hermenau: when the randomly picked post’s permalink is on another domain, WordPress does not redirect. Hermenau reported that the redirect is skipped on purpose in that case. The page served instead is a normal 200 response without the no-cache and noindex headers the redirect sends, so a page cache can keep /random/ on that one post. In reply, Aaron Jorbin said the redirect works correctly if the other domain is registered as a safe domain to redirect to, and that the lack of no-cache and noindex headers “sounds like a bug worth fixing.” Matt Mullenweg called it a “super-essential” catch.

Some commenters asked for the feature to be reconsidered. One commenter wrote on November 6, “Please reconsider putting this in core.” The feedback was largely critical, but the feature remained on by default in the dev note, and the thread does not show it being turned off by default or removed.

A checklist before December 8

WordPress 7.2 is scheduled to be the final major release of 2026. The release schedule lists Release Candidate 1 for 17 November 2026 and the final release for 8 December 2026. Site owners, and the hosts and agencies who manage their updates, have a short window to decide how to handle this feature:

  • Decide whether the WordPress 7.2 random endpoint is useful for the site at all. A personal blog built around discovery is a different case from a business site, store, or membership platform where unplanned content exposure carries more downside than upside.
  • If the decision is to turn it off, add the wp_enable_random_content_redirect filter to a mu-plugin before the update, rather than after noticing unexpected traffic.
  • Check custom post types registered on the site and decide whether they should pass 'randomable' => false, particularly any that hold internal or business records and are publicly queryable with an archive.
  • If database load is already a concern, read the comment thread and the performance ticket, #66654, before the update lands.

This is one of several WordPress 7.2 changes worth testing before the release. Hosts should also see the earlier breakdown of WordPress 7.2’s Secrets API: What Your Host Needs to Test Before December 8 for another item on the pre-release checklist.

What is still unconfirmed

The dev note does not describe a per-post setting for excluding an individual post from the WordPress 7.2 random endpoint while keeping it published elsewhere. The only documented controls are the site-wide filter, the randomable post type argument, and custom query code. The thread does not say whether the header gap will be fixed before December 8, and Release Candidate 1 had not been announced at the time of writing. The timing figures in this article come from one commenter’s laptop test, not from an official benchmark published by the WordPress core team.

Featured image: “Awaiting servers” by bugeaters, licensed CC BY 2.0, via www.flickr.com.