JPKCom Rank Math Options — Guide & Tips

Use JPKCom Rank Math Options to unlock the robots.txt/.htaccess editors despite DISALLOW_FILE_EDIT, remove Rank Math credits and disable telemetry, with zero configuration.

JPKCom Rank Math Options is a lightweight companion plugin for Rank Math SEO. Rank Math disables its robots.txt and .htaccess editors whenever the WordPress constant DISALLOW_FILE_EDIT or DISALLOW_FILE_MODS is set. This plugin re-enables them through the official rank_math/can_edit_file filter and trims a few Rank Math defaults most operators end up disabling anyway. There is nothing to set up: activating it is enough.

Please note: because that is the only condition Rank Math checks, re-enabling the editors means overriding those constants where they are set. On Apache, .htaccess is effectively server configuration — activate this plugin only where that is intended.

Verified against Rank Math 1.0.275.

Guide

Requirements

  • WordPress 6.9 or newer (tested up to WordPress 7.1)
  • PHP 8.3 or newer
  • Rank Math SEO must be installed and active — the plugin header declares Requires Plugins: seo-by-rank-math, so WordPress prevents activation otherwise
  • Network-ready: can be network-activated on multisite and takes effect on every site

Installation

  1. Upload the jpkcom-rank-math-options directory to /wp-content/plugins/, or install the ZIP via Plugins → Add New → Upload Plugin.
  2. Activate the plugin (network-wide on multisite) under Plugins → Installed Plugins.
  3. Make sure Rank Math SEO is active.
  4. Open Rank Math → General Settings → Edit robots.txt or Edit .htaccess — the editors are now available.

Configuration

There is nothing to configure — activating it is enough. If you want to disable the behaviour temporarily without deactivating the plugin, you can unhook the filter from another plugin or your functions.php:

remove_filter( 'rank_math/can_edit_file', '__return_true' );

Tips & Tricks

  • Why the editors are missing in the first place: Rank Math checks a single condition — whether DISALLOW_FILE_EDIT or DISALLOW_FILE_MODS is defined and true in your wp-config.php. If neither is set, the editors are already available and this plugin changes nothing there. Multisite makes no difference of its own. (Up to version 1.0.9 a different explanation stood here — the multisite reasoning was simply wrong.)
  • Cleaner source & sitemap: The "Powered by Rank Math" HTML comment in the frontend and the "Generator" line in the XML sitemap are removed.
  • Telemetry off — actually, since 1.0.10: Rank Math's switch is the standalone rank_math_mixpanel_optin option. The plugin filters every read of it to false, so Optin::can_track() reports off no matter what is stored, and it also blocks writes to that option, so an opt-in never reaches the database. Deactivating this plugin therefore leaves tracking off rather than quietly switching it back on. Relevant for existing installations: up to version 1.0.9 the plugin rewrote a usage_tracking key in rank-math-options-general — a field that is never stored there and does not govern the tracking state either. Tracking was therefore not actually switched off. If you relied on that, this update matters.
  • Spec-compliant llms.txt: Rank Math prepends an intro paragraph to the generated llms.txt; the plugin strips it so the file starts with the site's H1 as the spec expects. Since 1.0.10 this runs through the rank_math/llms_txt/remove_credit filter that Rank Math has since added for exactly this. The previous approach compared the request path against the literal /llms.txt and therefore never ran on a subdirectory installation — precisely the case it was written for.
  • Tidy admin bar: The Rank Math menu node is removed from the WordPress admin bar (frontend and backend).
  • No database writes: The plugin only hooks into Rank Math filters — no UI, no options, no database entries of its own.

Further reading