Disable Random Content

Description

WordPress 7.2 adds random content redirects for URLs such as /random/ and for archive requests containing ?random=1. This plugin turns off that feature through the wp_enable_random_content_redirect filter.

The plugin refreshes rewrite rules when activated or deactivated. In a multisite network, it clears each site’s saved rules so WordPress can regenerate them with that site’s own settings on the next request.

Installation

  1. Install the plugin in /wp-content/plugins/disable-random-content/.
  2. Activate it for one site or across the network.

FAQ

Does this disable all random ordering in WordPress?

No. It disables the random content redirect feature. Queries that explicitly use random ordering for other purposes are unaffected.

What happens to existing `/random/` URLs?

The plugin removes the special rewrite rules. Those URLs then follow the site’s ordinary routing rules.

Reviews

November 12, 2026
This plugin will be the most popular after release of WP 7.2! Author, thank you for saving us from WP random!
Read all 1 review

Contributors & Developers

“Disable Random Content” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.1.0

  • Keep random content redirects disabled after deactivation and reactivation in the same request.

1.0.0

  • Disable random content redirects and their rewrite rules.
  • Refresh site and network rewrite rules when activation status changes.