WooCommerce / WordPress

WordPress / WooCommerce store · WordPress 7.2

WordPress 7.2 adds /random/ — on by default, no off switch in admin: decide now, disable it with one filter if you don’t want it

First published 14 November 2026 · Updated on 14 November 2026 · Verified against the Make WordPress Core dev note “Your Content Is Going To Get More Random!” (5 November 2026) and the official WordPress 7.2 release schedule — both read in full on 14 November 2026

Merroway Editorial · Verified against governing standards and vendor documentation.

The fast answer

WordPress 7.2, due 8 December 2026, adds /random/ — and it is on by default. A visitor to yoursite.com/random/ lands on a randomly chosen published post, and the same trick works by category, tag, author and post type. There is no off switch in the admin: the Permalinks screen only lets you rename the base word. If you do not want it, add one filter — add_filter( 'wp_enable_random_content_redirect', '__return_false' ); — in a must-use plugin (Fix 3), then flush your permalinks (Settings → Permalinks → Save Changes) and test /random/ to prove it stopped redirecting. Decide now, while 7.2 is still in beta — Release Candidate 1 is 17 November — and test the beta on staging, never on your live store. If you are happy for visitors to stumble onto old posts — including old sale posts and, on a WooCommerce store, random products — do nothing. If not, add the filter before you update to 7.2.

Advertisements

What you are looking at, in plain words

WordPress announced the change in a dev note on Make WordPress Core, “Your Content Is Going To Get More Random!”, published 5 November 2026. Its opening, word for word: “A request to example.com/random/ will lead end users to a randomly selected published post. The feature is on by default and is built on the existing rewrite, WP, and WP_Query APIs.” That is the whole premise in two sentences: a new public address on your site, switched on for everyone, with a code filter as the only off switch.

It is not just one address. The random base is prefixed to existing archive paths, so with pretty permalinks on, WordPress generates these rules: /random/ redirects to a random post; /random/category/release/ redirects to a random post in the release category, and any publicly queryable taxonomy attached to an eligible post type gets a similar rule (for example /random/tag/dev-note/); /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 that is randomable. Only published posts are eligible — the dev note says “a randomly selected published post”, and drafts are not in the pool.

Which content can it serve? A new randomable argument on register_post_type() controls eligibility. 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, post is randomable; page and attachment are not. So /random/ will never land a visitor on one of your pages — but it can land them on any published post, however old.

On a WooCommerce store, the same rule reaches your products. A custom post type is randomable by default when it is publicly queryable and has an archive, and WooCommerce’s product post type is both on a standard store with a shop page — so /random/product/ should send a visitor to a random product on your store. That is the part store owners most often miss: this is not only a blogging feature. If you sell from WordPress, decide about your products as well as your posts.

WordPress 7.2 — /random/ is on by default One new address — and it works by section too /random/ Any published post on your site, picked at random Pages and attachments are never served /random/category/…/ A random post in that category — tags and authors work the same way /random/product/ A random WooCommerce product — the product post type is randomable on a standard store No off switch in admin The Permalinks screen only renames the /random/ base One filter turns it all off (Fix 3) Decide before 8 December 2026 — the 7.2 release date If you update without the filter, /random/ goes live with it
Drawn map — not a screenshot: the /random/ addresses WordPress 7.2 adds, what each one serves, and the one way to turn them off.

Step 0 — Work out where you stand

  1. Look at what /random/ could surface. Open your Posts list and sort by oldest. Every published post is eligible — including old sale announcements, out-of-date prices, posts about products you no longer sell, and posts by authors who have left. If the oldest posts on your site would embarrass or mislead a customer today, that is your answer: turn the feature off, or clean those posts up first.
  2. Check whether you sell from WordPress. If you run WooCommerce, /random/product/ can send a shopper to a random product — including one you would not choose as a first impression. Check your oldest products the same way you checked your oldest posts.
  3. Decide which camp you are in. Keep it if your site lives on discovery — a blog, a magazine, a store where an old post is still a good read. Turn it off if your posts are time-sensitive, if old prices or expired offers would mislead, or if you simply do not want a new public address on your site that you never asked for. There is no wrong camp — but there is a wrong time to decide, which is after the update.
  4. Check your update plan. If your site auto-updates to major WordPress releases, 7.2 will install itself on or just after 8 December 2026, and /random/ goes live with it. If you update by hand, the decision point is the day you press update. Either way, the filter has to be in place before the update if you do not want a single day of /random/ being live.
  5. Remember nothing here is live on your site yet. WordPress 7.2 is still in beta — Beta 5 landed on 10 November 2026, Release Candidate 1 is due 17 November, and the final release is 8 December. Unless you installed the beta, your site does not have /random/ today. That is why the decision window is now, not in December.
DateWhat happens
5 Nov 2026WordPress dev note published: /random/ is coming in 7.2, on by default, filter to disable
10 Nov 2026WordPress 7.2 Beta 5 — the version to test on staging
17 Nov 2026Release Candidate 1 — test the release candidate on staging now
8 Dec 2026WordPress 7.2 released — /random/ goes live on every updated site, on by default
After 8 Dec 2026If you updated without the filter, /random/ is live — add the filter at any time to turn it off

About this table: the dates are WordPress’s own, from the official WordPress 7.2 release schedule on Make WordPress Core, read in full on 14 November 2026. The 8 December date is the final release, not a beta — from that day, every site that updates to 7.2 gets /random/ unless the filter is already in place.

The fixes, in order

  1. Decide: keep it, or turn it off. Use Step 0, not a gut feeling. Keep it if your old posts still sell you well and you like the idea of visitors stumbling onto them. Turn it off if old posts carry old prices, expired offers or out-of-date advice, if you run a store where a random product is a bad first impression, or if you do not want a new public address you never asked for. Write the decision down — “keep” or “off” — and the date you decided, so the next person who touches the site does not have to guess.
  2. Test it on staging first — never on your live store. WordPress 7.2 is still in beta, and the beta does not belong on a live shop. Set up the beta on a staging copy and try the addresses yourself: visit /random/ three times and see which posts it serves, then try /random/category/ with one of your real categories and /random/product/ if you run WooCommerce. That ten-minute test tells you more than any article can. Our guide on testing the WordPress 7.2 beta on staging — and why it must not go on your live store before Black Friday walks through the staging setup.
  3. Turn it off with the one filter — in a must-use plugin. If your decision is “off”, create the file wp-content/mu-plugins/disable-random-content.php on your site (create the mu-plugins folder if it does not exist) with exactly this content:

    <?php
    /**
     * Plugin Name: Disable Random Content Redirects
     * Description: Turns off the /random/ redirects added in WordPress 7.2.
     */
    add_filter( 'wp_enable_random_content_redirect', '__return_false' );

    That is the filter from WordPress’s own dev note, word for word. Use a must-use plugin on purpose: mu-plugins load automatically, cannot be deactivated from the admin, and survive a theme change — so the off switch stays off. Do not put this line in your theme’s functions.php: a theme update or a theme change would silently drop it, and /random/ would come back with no warning. The dev note says this filter means “no random rewrite rules are generated, the random base field is hidden on the permalinks screen, and the random query variable is ignored.” If you have already updated to 7.2, the filter still works — add it now; it is not a before-only step.
  4. Flush the rewrite rules, then prove it stopped. After adding the file, go to Settings → Permalinks and press Save Changes — you do not need to change anything, the save itself flushes the rewrite rules. Then visit yoursite.com/random/ in a private browser window. It should no longer redirect you to a post: your site should behave as it does for any address that does not exist. Check /random/product/ and one category variant the same way. Also look at the Permalinks screen itself: with the filter active, the Random base field is gone — that is the dev note’s own confirmation that the filter is working.
  5. If you keep it: rename the base instead (optional). If your decision is “keep” but you do not like the word “random” in your addresses, go to Settings → Permalinks and change the value in the Random base field to your own word. That moves the address — for example from /random/ to your chosen word — it does not turn the feature off. Only do this if you want the feature under a different word; if you want it gone, Fix 3 is the step, not this one.
  6. If you keep it: prune what it can surface. Go through your oldest published posts and ask of each one: “Would I be happy if a customer landed here first?” Update the ones that are nearly right, and unpublish the ones that would mislead — old prices, expired offers, discontinued products. Do the same for your oldest WooCommerce products, since /random/product/ can serve those too. This is the one piece of housekeeping the feature forces, and it is worth doing even if you later change your mind and turn it off.

WordPress 7.2 is still in beta — the default could still change. The dev note is dated 5 November 2026, and this feature has already been pulled out and put back once during this cycle: merged, reverted on 23 September and re-added on 16 October, according to independent coverage of Trac ticket #64498. The default could still change before the 8 December release. If it does, this guide’s premise changes with it — check the dev note again at release, and do not treat this page as a promise about the final release.

Side note — the pushback, from a named secondary source. The Repository reported on 9 November 2026 that developers pushed back on the feature being on by default, most objecting to the default rather than to the feature itself. The concerns raised were performance — the random pick orders by RAND(), in the dev note’s own description, and bots hitting /random/ repeatedly — and caching. The dev note’s author had not said whether the default will change before release. Timings reported so far are informal — the ticket’s benchmarks went up to 200,000 posts and one developer reported about two seconds on a site with two million posts — but no official benchmark was published, so do not treat the performance concern as a proven fact.

Prove it worked

If you turned it off, visit yoursite.com/random/ in a private browser window: it should no longer redirect you to a post, and the Random base field should be gone from Settings → Permalinks. Check one category variant and /random/product/ the same way — none of them should redirect. If you kept it, visit /random/ three times: you should land on different published posts (a repeat is possible — it is random, not a rotation), and /random/product/ should land you on a product. After 8 December, check your live site is actually on 7.2 (Dashboard → Updates) and run the same test again — the filter, or the decision to keep it, only matters once the update is in.

Still not working? Work this ladder in order

  1. /random/ still redirects after you added the filter. Flush the permalinks first: Settings → Permalinks → Save Changes. Then check the file itself: it must be in wp-content/mu-plugins/ (not wp-content/plugins/), the filename must end in .php, and the filter name must be exactly wp_enable_random_content_redirect — one wrong letter and WordPress never sees it.
  2. The Random base field is still on the Permalinks screen. That means the filter is not active — same checks as above. A must-use plugin with a typo in the filename or the filter name loads as nothing at all, with no error to tell you.
  3. /random/ shows a “not found” page but you wanted it on. That is the filter doing its job. Remove the mu-plugin file, flush the permalinks again (Settings → Permalinks → Save Changes), and /random/ comes back.
  4. /random/ landed on a draft or private post. It should not: only published posts are eligible. Check that post’s status — a post set to Published is eligible even if it is years old, and “published” is the only status the dev note promises is in the pool.
  5. The same “random” post comes up every time. The pick is random per request, but a page cache can freeze one result and serve it to everyone. That is a caching question for your host, not a WordPress setting — the dev note does not promise any cache behaviour, and clearing the cache is the test.
  6. None of these fits. Take the exact address you visited, what you expected, what you got instead, and your WordPress version to the dev note’s ticket — Trac ticket #64498, linked from the dev note — or to the WordPress support forums.

Mistakes that make it worse

  • Testing the 7.2 beta on your live store instead of staging — the beta does not belong on a live shop, especially before Black Friday.
  • Putting the filter in your theme’s functions.php — a theme update or change silently drops it, and /random/ comes back with no warning.
  • Assuming the Permalinks screen can turn it off — it only renames the base word; the filter is the off switch.
  • Waiting until after 8 December to decide, then finding old sale posts one click away from every visitor.
  • Treating the developer pushback as proof the feature is slow or broken — the only timings reported are informal tests, not an official benchmark; it is a raised concern, not a proven fact.
  • Forgetting /random/product/ on a WooCommerce store — the products are in the pool too on a standard store.
  • Assuming your old published posts are safe because they are old — published is the only status that matters, and old posts are exactly what /random/ surfaces.
  • Editing the mu-plugin file on the live site without testing it on staging first — a PHP typo in mu-plugins can break the whole site.
Advertisements

Frequently asked questions

What does /random/ actually do on my site?

From WordPress 7.2, anyone who visits yoursite.com/random/ is sent to a randomly chosen published post on your site. It works by section too: /random/category/news/ sends a visitor to a random post in that category, /random/tag/dev-note/ to a random post with that tag, /random/author/jorbin/ to a random post by that author, and /random/{post-type-slug}/ to a random post of a custom post type that is randomable. Only published posts are eligible, and pages and attachments are not included.

Is there really no off switch in the WordPress admin?

There is no checkbox or setting that turns /random/ off. The WordPress dev note is explicit: the feature is on by default, and the way to disable it is the wp_enable_random_content_redirect filter. What the admin does offer is a Random base field on Settings, Permalinks, which lets you rename the /random/ base word — that moves the address, it does not turn the feature off.

How do I turn /random/ off?

Add one filter in a must-use plugin. Create the file wp-content/mu-plugins/disable-random-content.php containing the line add_filter( 'wp_enable_random_content_redirect', '__return_false' );, then go to Settings, Permalinks and press Save Changes to flush the rewrite rules. The dev note says that filter means no random rewrite rules are generated, the Random base field is hidden on the Permalinks screen, and the random query variable is ignored. Test it by visiting yoursite.com/random/ — it should no longer redirect you to a post.

Will /random/ show my WooCommerce products too?

Yes, under the dev note’s own rule — on a standard store. A custom post type is randomable by default when it is publicly queryable and has an archive, and WooCommerce’s product post type is both on a standard store with a shop page, so /random/product/ should send a visitor to a random product on your store. That includes products you would not choose as a first impression, so check your oldest products as well as your oldest posts before you decide.

Could /random/ send visitors to an old post I would rather they did not see?

Yes. Every published post is eligible, including old sale announcements, out-of-date prices and posts about products you no longer sell. That is the point of the feature — surfacing older content — but if an old post would mislead a customer, either update or unpublish it before 8 December, or turn the feature off with the filter. The dev note gives no per-post switch: the controls are the filter for the whole feature, or the randomable argument for a whole post type, which is a developer-level change.

Why are developers pushing back on this being on by default?

This is a labelled side note from a named secondary source, not from WordPress itself. The Repository reported on 9 November 2026 that developers pushed back on the feature being on by default, most objecting to the default rather than to the feature itself. The concerns raised were performance — the random pick orders by RAND(), in the dev note’s own description, and bots hitting /random/ repeatedly — and caching. The dev note’s author had not said whether the default will change before release. Timings reported so far are informal — the ticket’s benchmarks went up to 200,000 posts and one developer reported about two seconds on a site with two million posts — but no official benchmark was published, so this guide does not present the performance concern as a proven fact.

What happens if WordPress changes the default before 8 December?

WordPress 7.2 is still in beta: Beta 5 landed on 10 November 2026, Release Candidate 1 is due 17 November, and the final release is 8 December 2026. The feature has already been pulled out and put back once during this cycle — merged, reverted on 23 September and re-added on 16 October, according to independent coverage of Trac ticket 64498 — so the default could still change. If it does, this guide’s premise changes with it: check the dev note again at release, and do not treat this page as a promise about the final release.

Sources

Make WordPress Core — Your Content Is Going To Get More Random! (Aaron Jorbin, 5 November 2026: a request to example.com/random/ leads to a randomly selected published post; the feature is on by default; the /random/category/, /random/tag/, /random/author/ and /random/{post-type-slug}/ rules; the randomable rule — post is randomable, page and attachment are not; the wp_enable_random_content_redirect filter in a mu-plugin and its three effects; the pick orders by RAND()) · Make WordPress Core — WordPress 7.2 release schedule (Beta 5 on 10 November 2026; Release Candidate 1 on 17 November; Release Candidate 2 on 24 November; Release Candidate 3 on 1 December; dry run on 7 December; WordPress 7.2 released on 8 December 2026) · Side note, named secondary source for the pushback only: The Repository — Developers Push Back on WordPress 7.2’s New /random/ Endpoint Being On by Default (9 November 2026: a wave of pushback, most objecting to on-by-default; performance and caching concerns; no word on whether the default will change) · Merroway — WordPress 7.2 Is Coming 8 December — Test the Beta on Staging Now, Do NOT Install It on Your Live Store Before Black Friday (live guide; the staging test this guide points to) · Merroway — WooCommerce 11.3 Is Out (11 Nov 2026): What Changed, and the PHP 8.1 Warning That Starts Now (live guide; the WooCommerce update landing in the same month).

Verification note: the dev note and the 7.2 schedule page were each read in full on 14 November 2026 (both crawled 14 November 2026, 05:04 UTC). Every load-bearing claim in this guide — /random/ on by default, the URL variants, the randomable rule, the filter name and its three effects, and the 17 November / 8 December dates — is quoted from those two official pages, not from a search snippet or a third-party summary. The pushback is a labelled side note from a named secondary source: the full article was re-fetched in full during deep verification on 14 November 2026 (crawled 05:36 UTC), after the build-time re-fetch had returned a rate-limit error, and its description is now verified word-for-word against that fetch — including the reported timings, which are informal tests, not an official benchmark. No pushback figure is load-bearing. The /random/product/ point applies the dev note’s own randomable default rule to WooCommerce’s product post type: WooCommerce registers product as publicly queryable, with its archive set to the shop page on a standard store (and no archive where the theme does not declare WooCommerce support), so the guide says “should” for products. Deep verification also re-fetched the dev note in full; the official schedule page re-fetch was rate-limited by the browser service, and its dates were corroborated by the Repository article, which lists the same Beta 5, RC1 and 8 December dates. No live guide covers /random/ — the live 7.2 beta guide was read and never mentions it — and no not-yet-published guide is linked anywhere in this guide.