WP Manifestindependent plugin directory
manifest / developer / render-command

Render Command WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+

A WordPress plugin that provides a WP-CLI command to render a WordPress URL path and output the raw HTML.

★ 6stars
53release downloads
v.1.2.0latest · 1 year ago

Install

Download render-command.zip From the v.1.2.0 release on GitHub, Apr 25, 2025

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/austinginder/render-command/releases/download/v.1.2.0/render-command.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that provides a WP-CLI command to render a WordPress URL path and output the raw HTML, HTTP status code or the URL itself. It includes an optional flag to exclude specific plugins from the request, useful for debugging or performance testing.

Description

The Render Command plugin adds a wp render command to WP-CLI, allowing you to render a WordPress page by specifying its URL path. The plugin supports excluding specific plugins during the request using the --without-plugins flag, which can help isolate issues or test performance without certain plugins.

When activated, the plugin creates a must-use (mu-plugin) file to handle plugin exclusion logic via secure query parameters. This mu-plugin is automatically removed upon deactivation. You can also use the --link flag to generate and output the URL (including exclusion parameters) without actually making the HTTP request.

Installation

Download the plugin from GitHub or install and activate using WP-CLI:

wp plugin install https://github.com/austinginder/render-command/releases/latest/download/render-command.zip --activate --force

Usage

The plugin provides the following WP-CLI command:

wp render <path> [--without-plugins[=<plugins>]] [--format=<format>] [--link]

Options

  • <path>: The URL path to render (e.g., /about-us/).
  • [--without-plugins[=<plugins>]]: Exclude plugins for the request. If the flag is provided without a value, all plugins are excluded. If a comma-separated list of plugin slugs is provided (e.g., jetpack,wordpress-seo), only those specific plugins are excluded. Requires a valid AUTH_SALT defined in wp-config.php. This option modifies the URL generated when used with --link.
  • [--format=<format>]: Determine the output format when making the request (ignored if --link is used).
    • raw (default): Outputs the full HTML response body.
    • http_code: Outputs only the HTTP status code (e.g., 200, 404).
  • [--link]: If present, output the generated URL (including any exclusion parameters) instead of making the HTTP request.

Examples

  • Render the homepage:

    wp render "/"
  • Render an about page excluding the jetpack and wordpress-seo plugins:

    wp render "/about-us/" --without-plugins="jetpack,wordpress-seo"
  • Render a contact page excluding all plugins:

    wp render "/contact" --without-plugins
  • Get only the HTTP status code for the shop page, excluding all plugins:

    wp render "/shop" --without-plugins --format=http_code
  • Output the URL that would be requested for the products page, excluding all plugins, without making the request:

    wp render "/products" --without-plugins --link

How It Works

  • Plugin Exclusion: The --without-plugins flag adds secure query parameters (exclude_plugins and exclusion_token) to the request URL. The mu-plugin validates the token (based on AUTH_SALT) and filters the option_active_plugins hook to exclude plugins based on their slugs for that specific request only.
  • MU-Plugin: On activation, the plugin creates an mu-plugin (render-command.php) in the /wp-content/mu-plugins/ directory to handle plugin exclusion logic. This file is removed on deactivation.
  • Output: The command outputs the raw HTML, HTTP status code, or the generated URL to the terminal based on the provided flags (--format, --link).

Requirements

  • WordPress 5.0 or higher
  • WP-CLI 2.0 or higher
  • PHP 7.4 or higher

License

This plugin is licensed under the MIT License.

Author

Contributing

Contributions are welcome! Please submit issues or pull requests on the GitHub repository.

Changelog

1.2.0 - 2025-04-25

  • Added --link flag to output the generated URL (including exclusion parameters) instead of making the HTTP request.

1.1.0 - 2025-04-21

  • Added --without-plugins flag without value to exclude all plugins for the request (e.g., wp render "/" --without-plugins).
  • Introduced --format option to control output format:
    • raw (default): Outputs the full HTML response.
    • http_code: Outputs only the HTTP status code (e.g., 200, 404).
  • Added request timeout:
    • Set a 120-second timeout for wp_remote_get to handle slow responses.
    • Disabled SSL verification (sslverify => false) for flexibility in local or testing environments.

1.0.0 - 2025-04-20

  • Initial release with wp render command and plugin exclusion functionality.
  • Added --without-plugins= flag for excluding specific plugins via comma-separated slugs.
  • Implemented MU-plugin for handling exclusion logic based on exclude_plugins and exclusion_token query parameters.

Releases

3 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v.1.2.0 latest
Apr 25, 2025 1 year ago
render-command.zip
47
Apr 21, 2025 1 year ago
render-command.zip
2
Apr 20, 2025 1 year ago
render-command.zip
4
D+ grade

Security

Render Command 1.2.0 · audited by WP Registry

High-severity findings.

1 high 1 medium
Audited release
1.2.0
Findings
2
Worst severity
high
Content hash
d0a0b42c44a6d2af9e791a75…

Findings

  • high Unauthenticated per-request plugin disable via hardcoded/default HMAC key

    predictable_token

    On activation, activate() file_put_contents()s wp-content/mu-plugins/render-command.php (LOCK_EX, chmod 0644). That MU-plugin always hooks option_active_plugins at priority 9999. On any non-is_admin() request that has GET exclude_plugins and exclusion_token, it HMAC-SHA256s the fixed message 'render-command-exclusion' with AUTH_SALT, or with the literal 'render-command-fallback-salt' when AUTH_SALT is undefined, empty, false, or '0'. hash_equals() then authorizes filtering; exclude_plugins=__ALL__ returns [] (no regular plugins load). The CLI path in RenderCommand::__invoke errors if AUTH_SALT is missing ('requires AUTH_SALT ... for security'), but the web-facing MU-plugin still accepts the public fallback token 5368a5c666c085792e6b4e5a0505feca4d09dc7923ca97d9ef0da86382b65f6b. The plugin also uses the AUTH_SALT constant directly instead of wp_salt('auth'); WordPress core treats 'put your unique phrase here' (wp-config-sample.php) as insecure and replaces it with a DB-backed secret, so sites left on the sample phrase accept the second public token fabebef0696ec3d6c20811ca31c07738ccebe0be38180c2330181985946b409c. getenv()-style defines that leave AUTH_SALT false/empty take the fallback. is_admin() is false for wp-login.php, REST, XML-RPC, wp-cron.php, and the front end, so 2FA/limit-login/WAF/membership plugins can be skipped for an unauthenticated request. Token is non-expiring, not bound to path/time/IP, and is passed in the query string. Probe: GET /wp-content/plugins/render-command/readme.md then GET /wp-login.php?exclude_plugins=__ALL__&exclusion_token=<fallback-or-default>. Network-activated plugins (multisite) and other MU-plugins are not filtered. Deleting the plugin folder without deactivating leaves the MU-plugin in place.

    render-command.php:40-43,72-106

    Recommendation

    Do not ship a hardcoded HMAC key. In the MU-plugin, refuse to filter unless a dedicated high-entropy secret exists (random option generated on activation, or wp_salt('auth') — never AUTH_SALT constant and never a fallback string). Reject WordPress's sample phrase 'put your unique phrase here' the same way wp_salt() does. Align the web gate with the CLI check: if AUTH_SALT/secret is missing, no-op. Bind tokens to a short TTL and to the path; pass them in a header or POST, not GET. Do not install the MU-plugin until the operator explicitly enables --without-plugins support. On deactivation and uninstall, delete the MU-plugin; add an uninstall.php so deleting the plugin folder without a clean deactivate does not leave the backdoor.

  • medium Always-on MU-plugin debug switch with non-expiring query-string token

    dev_tool_in_production

    The product is a WP-CLI debug aid, but activation always deploys mu-plugins/render-command.php for every subsequent front-end request, even if nobody ever runs wp render --without-plugins. When AUTH_SALT is unique the HMAC is unguessable, yet --link (v1.2.0) prints the full URL including exclusion_token to stdout, and every successful --without-plugins request puts that token in the query string (web server access logs, CDN logs, browser history, Referer to third-party assets on the rendered page). The token never rotates except when AUTH_SALT is changed (which also invalidates auth cookies). Anyone who later obtains that URL can disable arbitrary regular plugins on wp-login.php / REST / the front end with no capability check. sslverify is also false on the CLI wp_remote_get, which is operator-local rather than a web issue.

    render-command.php:153-154,286-297

    Recommendation

    Keep plugin-exclusion off until an explicit opt-in constant or setting is enabled; remove the MU-plugin when the feature is unused. Issue single-use or time-boxed tokens stored hashed in an option, not a static HMAC of AUTH_SALT. Prefer a request header over query arguments so the secret is not written to access logs or leaked via Referer. Do not add --link output of live secrets in CI-friendly stdout without a warning. Restore sslverify to true (or honor https_ssl_verify) on wp_remote_get.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.