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 (opens in a new tab). 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 settings of its own: The plugin only hooks into filters and actions — no UI, no options of its own. Its only database entries are the GitHub updater's site transients caching the update manifest (stored in the database unless a persistent object cache is used).
  • Updates from GitHub only: Since 1.0.11 the plugin carries the Update URI header: the wordpress.org update API then no longer returns updates for it, so a plugin published there under the same slug cannot pose as an update. Since 1.0.12 Dashboard → Updates shows the JPKCom logo next to the plugin instead of the generic pattern.
  • Updates while deactivated: Since 1.0.13 the plugin ships updater 1.5.0, which also serves deactivated JPKCom plugins: if you have deactivated this plugin, it is still offered updates — provided another JPKCom plugin with updater 1.5.0 or newer is active, because WordPress never runs the code of a deactivated plugin (the version of the deactivated plugin itself does not matter). The active plugin's updater serves every installed JPKCom plugin with the update row, the icon and "View details", and the SHA-256 check applies just the same; on multisite at least one JPKCom plugin must be network-active or active on the main site. The stored list of plugin updates no longer contains JPKCom download URLs — they are added back only while a JPKCom updater is loaded, so without one no unverified package can be installed. The checksum also covers a package supplied by another plugin and every GitHub address of the release file. If the plugin sits in a Git (or other version-control) checkout, you are told about new releases, but WordPress never updates it itself — the update would delete the checkout; this applies whether the plugin is active or deactivated. The same goes for an active plugin in a renamed folder (such as jpkcom-rank-math-options-main), because the update would delete the folder; a deactivated plugin in a renamed folder is not recognised by the updater at all, so it is not told about new releases either. The updater fetches update information only for accounts that can update plugins, in the update cron and in WP-CLI, never for anonymous visitors.

Further reading