WordPress 7.2 ships December 8, 2026 with a public /random/ redirect enabled by default and no dashboard switch to turn it off.1,2 Add a one-line must-use plugin to disable it before upgrading, then check the few 7.2 changes that can break your site.
The short version: /random/ sends uncacheable 302 redirects straight to your origin server and exposes archive-backed custom post types unless you opt out in code.3,4,5 The rest of 7.2 brings useful upgrades in the Abilities API, wider client-side media processing, inline SVG admin icons, and a handful of REST and Interactivity API breaking changes.2
WordPress 7.2 Release Candidate 3 (7.2-RC3-65804, after RC2 shipped alongside 7.1.5 on November 18) is out ahead of release day, so I wanted a practical pre-upgrade checklist on the blog before sites start updating.1 Every code detail below comes from the November 2026 Field Guide, the Core developer notes, and the pinned 7.2-RC3 source on GitHub, without a live 7.2 upgrade test yet.2,6
Warning: disable /random/ before upgrading to WordPress 7.2
Every site that upgrades to WordPress 7.2 gets /random/, /random/category/{slug}/, /random/tag/{slug}/, /random/author/{name}/, /random/{post-type-slug}/, and the ?random query variable switched on by default.3 There is no toggle in the WordPress dashboard, so if you don’t want a random-redirect endpoint on production, disable it in code before you update.
Why /random/ still hurts production after the RC3 query fix
Early 7.2 beta builds picked a random post with ORDER BY RAND() LIMIT 1 on every request, which prompted performance warnings from hosting engineers.3,7 In 7.2-RC3, wp_random_content_posts_pre_query() replaces that first pass with sampling by primary key: it caches MAX(ID) for 10 minutes, picks 50 random IDs, and tries up to three queries to find an eligible published post.8
That helps dense blogs, but two real origin risks remain in the RC3 source:
- Every
/random/request bypasses full-page caches and CDNs by design.wp_random_content_redirect()callsnocache_headers(), addsX-Robots-Tag: noindex, follow, and sends a302redirect.4 Any bot or scraper hitting/random/or/random/category/...reaches PHP and MySQL every time. - When those three 50-ID sample attempts miss, such as on a small category or a
wp_poststable dominated by orders, revisions, or attachments, Core falls back toORDER BY RAND() LIMIT 1000and stores the pool in therandom-contentobject cache group for 10 minutes (with a one-hour stale copy).8 On a site with a persistent object cache like Redis or Memcached, that fallback runs at most once per 10 minutes per archive. Without a persistent object cache, WordPress’s defaultWP_Object_Cacheonly lives for a single PHP request, so repeat hits on a sparse archive run the fallback query again.9
There is also a content-exposure surprise. Custom post types get a new randomable argument in register_post_type(), and when it isn’t set, Core defaults it to true for every post type that is publicly_queryable and has has_archive enabled.5 Built-in posts qualify while pages and attachments don’t, so any archive-backed custom post type (store products, testimonials, legacy landing pages) becomes reachable through /random/ unless excluded in code.3,5
How to disable /random/ cleanly (and avoid the official filter typo)
Drop a must-use plugin into wp-content/mu-plugins/disable-random-redirect.php before upgrading to WordPress 7.2:
<?php
/**
* Plugin Name: Disable WordPress 7.2 Random Content Redirect
*/
add_filter( 'wp_enable_random_content_redirect', '__return_false' );
With that filter returning false, Core generates no random rewrite rules, hides the random base field on the Permalinks screen, and ignores the random query variable.3,6 If the site has already upgraded to 7.2, flush rewrite rules right after adding the file, either by saving Settings > Permalinks or running WP-CLI:6
wp rewrite flush
Watch the exact filter name carefully. The WordPress Developer Blog’s November 2026 roundup printed wp_enable_random_content_direct (missing re in redirect), which doesn’t exist in Core and leaves /random/ active.6,10 Copy wp_enable_random_content_redirect from the November 5 dev note or the source above.
If you actually want /random/ for blog posts but need to keep a custom post type out of it, set randomable to false when registering that post type:3,5
register_post_type(
'testimonial',
array(
'public' => true,
'has_archive' => true,
'randomable' => false,
)
);
What is actually worth using in WordPress 7.2
Across more than 440 Core Trac tickets, 21 new hooks, and Gutenberg 23.7 through 24.3, two developer areas stand out as practical upgrades you can build on right away.2
Core Abilities API gets real read abilities and stricter contracts
WordPress 6.9 introduced the Abilities API with three basic site and environment abilities; 7.2 adds three read-only abilities for querying site data: core/content-query, core/users-query, and core/settings-get.11 Custom post types and plugin settings are not exposed automatically. They stay hidden unless you opt in explicitly with 'show_in_abilities' => true in register_post_type() or register_setting() on init, and the dev note explicitly warns against enabling it for settings that store secrets.11
If you’ve been following how WordPress is positioning itself for AI agents (I wrote about that trade-off in Does my WordPress site actually need MCP?), the contract cleanup in 7.2 matters as much as the new abilities themselves:
- Abilities can declare
required_capabilitiesup front, checked viacurrent_user_can()before anypermission_callbackruns, and you can omitpermission_callbackwhen those static capabilities cover every call.12 WP_Ability::prepare_input()now normalizes, validates, and sanitizes input the same way across direct PHP calls and REST requests. Note two behavioral shifts:numberschemas convert integers like10to floats (10.0), and sanitization failures now returnability_invalid_inputinstead of falling back to unsanitized input.12wp_prepare_json_value_for_client()and updatedwp_prepare_json_schema_for_client()preserve empty objects as{}instead of PHP’s default[], so JSON clients expecting an object don’t break on empty results.12
Plugins that support WordPress versions older than 7.2 still need to keep their permission_callback and guard calls to the new helpers.12
Client-side media processing expands beyond the block editor
WordPress 7.1 introduced browser-side image resizing and sub-size generation inside the block editor using wasm-vips.13 WordPress 7.2 extends that same pipeline to the Media Library grid (upload.php), the Add New Media File screen (media-new.php), and wp.media modals (including the featured image panel and site editor).13
On the client-side path, animated GIF and WebP uploads now keep their animation across generated sub-sizes by default, with a new wp_generate_animated_image_subsizes filter if you need to turn that off.13 Client-side processing requires Chrome 137+ or Edge 137+ with more than 2 GB of device memory; Firefox and Safari don’t yet support Document-Isolation-Policy and fall back to server-side processing automatically.2
If you hooked into 7.1’s cross-origin isolation helpers, check your code: wp_start_cross_origin_isolation_output_buffer() and wp_add_crossorigin_attributes() are deprecated in 7.2, replaced by wp_send_document_isolation_policy_header() for the first and removed without a direct replacement for the second.2,13
Breaking changes and removals to test on staging
Even if you ignore the new features, several 7.2 changes touch admin markup, REST payloads, and older editor patterns that plugins and custom themes still depend on.
Dashicons in the admin menu and toolbar become inline SVGs
WordPress 7.2 replaces the twelve core top-level admin menu icons, the Collapse Menu arrow, and core admin bar icons with inline SVG elements from @wordpress/icons instead of Dashicons font glyphs drawn via CSS ::before.14
Any custom admin color scheme or plugin stylesheet that hides, recolors, or swaps core icons through ::before pseudo-elements will stop matching those icons.14 SVG icons inherit color through currentColor from their parent element (such as .ab-icon in the admin bar), so update rules targeting ::before to style the container or svg element too.14 Plugins that want to adopt the new icon system can pass registered icon names to add_menu_page(), register_post_type(), and WP_Admin_Bar::add_node(), gated with function_exists( 'wp_is_valid_icon_name' ) for older versions.14
REST API, Interactivity API, editor packages, and what missed 7.2
Check these smaller breaking shifts on staging before upgrading:
- Revision and autosave REST responses now return only meta keys registered for revisions (via
revisions_enabledorwp_post_revision_meta_keys), preventing restores from overwriting non-revisioned post meta.15 - The
/wp/v2/commentsendpoint now treats thestatusparameter as an array of strings instead of a single string, so code comparing$request['status']directly to a string needs updating.15 - The Interactivity API adds
data-wp-html(requiring explicitasDangerousHTML()orwp_interactivity_as_dangerous_html(), with no built-in sanitization) and removes previously deprecateddata-wp-ignore, two-hyphen unique directive IDs, and negated function references.16 @wordpress/componentscompletes its move from Emotion to SCSS Modules and deprecates eight components (Animate,Divider,Elevation,ResponsiveWrapper,Scrollable,Surface,Tip,ZStack) for removal in WordPress 7.4, whileInspectorControlsremoves the old__experimentalGroupprop in favor ofgroup.2- Core updates jQuery Migrate to 3.6.0 ahead of a tentative jQuery 4 move in WordPress 7.3, and adds
NO_BACKSLASH_ESCAPESto incompatible SQL modes disabled on database connection.2 - One headline feature from earlier 7.2 betas is not shipping: Core reverted the Secrets API on November 17, 2026 (
53ea8006d1), so sites upgrading to 7.2 won’t get it yet.17
If you manage WordPress sites ahead of December 8:
- Add the
wp_enable_random_content_redirectmust-use plugin now (double-check the spelling) and flush rewrites after upgrading. - Audit any archive-backed custom post types if you choose to keep
/random/on. - Test custom admin CSS, REST comment or revision integrations, and Interactivity API blocks on a staging copy running
7.2-RC3before touching production.
Sources
- 1 https://wordpress.org/news/2026/11/wordpress-7-2-release-candidate-3/ a b
- 2 https://make.wordpress.org/core/2026/11/20/wordpress-7-2-field-guide/ a b c d e f g h
- 3 https://make.wordpress.org/core/2026/11/05/your-content-is-going-to-get-more-random/ a b c d e f
- 4 https://github.com/WordPress/WordPress/blob/57b8a7b9b009bf00e0274efca08d834da0df5d31/wp-includes/query.php#L1823-L1844 a b
- 5 https://github.com/WordPress/WordPress/blob/57b8a7b9b009bf00e0274efca08d834da0df5d31/wp-includes/class-wp-post-type.php#L608 a b c d
- 6 https://github.com/WordPress/WordPress/blob/57b8a7b9b009bf00e0274efca08d834da0df5d31/wp-includes/query.php#L1274-L1286 a b c d
- 7 https://make.wordpress.org/hosting/2026/11/12/wordpress-7-2-hosting-tests/ ↑
- 8 https://github.com/WordPress/WordPress/blob/57b8a7b9b009bf00e0274efca08d834da0df5d31/wp-includes/query.php#L1640-L1794 a b
- 9 https://developer.wordpress.org/reference/classes/wp_object_cache/ ↑
- 10 https://developer.wordpress.org/news/2026/11/whats-new-for-developers-november-2026/ ↑
- 11 https://make.wordpress.org/core/2026/11/24/core-abilities-for-content-users-and-settings-in-wordpress-7-2/ a b
- 12 https://make.wordpress.org/core/2026/11/19/abilities-api-updates-in-wordpress-7-2/ a b c d
- 13 https://make.wordpress.org/core/2026/11/17/media-changes-in-wordpress-7-2/ a b c d
- 14 https://make.wordpress.org/core/2026/11/05/svg-icons-in-the-admin-bar-and-menu-in-wordpress-7-2/ a b c d
- 15 https://make.wordpress.org/core/2026/11/17/rest-api-changes-in-wordpress-7-2/ a b
- 16 https://make.wordpress.org/core/2026/11/17/changes-to-the-interactivity-api-in-wordpress-7-2/ ↑
- 17 https://make.wordpress.org/core/2026/11/11/the-secrets-api-in-wordpress-7-2/ ↑
