Skip to Content
PluginsLW Disable

LW Disable

Disable WordPress features you don’t need - comments, emojis, embeds, and more.

Overview

Requires WordPress6.0+
Requires PHP8.1+
Tested up to6.7
LicenseGPL-2.0-or-later
GitHublwplugins/lw-disable 

Installation

composer require lwplugins/lw-disable

Or upload the lw-disable folder to /wp-content/plugins/ and activate through the Plugins menu.

Features

General

  • Disable comments completely
  • Disable admin email notification on new user registration

Performance

  • Disable WordPress emoji scripts and styles
  • Disable oEmbed discovery and scripts
  • Disable WordPress Heartbeat API
  • Disable Gutenberg block CSS on frontend

Security

  • Disable XML-RPC protocol
  • Restrict REST API to logged-in users
  • Disable application passwords
  • Remove WordPress version meta tag

Head Cleanup

  • Remove shortlink from head
  • Remove Really Simple Discovery (RSD) link
  • Remove Windows Live Writer manifest link
  • Remove ?ver= query strings from assets
  • Remove prev/next post links from head

Content

  • Disable RSS feeds completely

Settings

Configure under LW Plugins > Disable. The settings page uses a tabbed interface organized by category (General, Performance, Security, Head Cleanup, Content). Each feature is a simple checkbox toggle.

WP-CLI Commands

# List all features and their status wp lw-disable list # Enable a feature (disables the WordPress functionality) wp lw-disable enable emojis wp lw-disable enable comments wp lw-disable enable xmlrpc # Disable a feature (restores WordPress default) wp lw-disable disable emojis wp lw-disable disable heartbeat # Enable all features at once wp lw-disable enable-all # Disable all features (restore WordPress defaults) wp lw-disable disable-all

Available Features

Feature KeyDescription
commentsComments system
admin_new_user_emailNew user admin email
emojisEmoji scripts/styles
embedsoEmbed system
heartbeatHeartbeat API
block_libraryGutenberg CSS
xmlrpcXML-RPC protocol
rest_apiREST API restriction
application_passwordsApp passwords
generatorVersion meta tag
shortlinkShortlink header
rsd_linkRSD link
wlw_manifestWLW manifest
version_stringsAsset version strings
adjacent_postsAdjacent post links
feedsRSS feeds

AI Abilities

When used with LW Site Manager, the following abilities are available for AI agents. All abilities are registered under the disable category and require manage_options capability.

lw-disable/get-options (readonly)

Get all current LW Disable feature settings.

  • Readonly: yes
  • Destructive: no
  • Idempotent: yes

Input: No required fields (empty object is fine).

Output:

{ "success": true, "options": { "comments": false, "admin_new_user_email": false, "emojis": false, "embeds": false, "heartbeat": false, "block_library": false, "xmlrpc": false, "rest_api": false, "application_passwords": false, "generator": false, "shortlink": false, "rsd_link": false, "wlw_manifest": false, "version_strings": false, "adjacent_posts": false, "feeds": false } }

curl example:

curl -s -X POST https://example.com/wp-json/lw-site-manager/v1/abilities/lw-disable/get-options \ -H "Content-Type: application/json" \ -H "X-WP-Nonce: <nonce>" \ -d '{}'

lw-disable/set-options (write)

Enable or disable WordPress features managed by LW Disable.

  • Readonly: no
  • Destructive: no
  • Idempotent: yes

Input:

FieldTypeRequiredDescription
optionsobjectyesMap of option keys to boolean values

Option keys:

KeyDescription
commentsDisable comments completely
admin_new_user_emailDisable admin email on new user registration
emojisDisable WordPress emoji scripts and styles
embedsDisable oEmbed discovery and scripts
heartbeatDisable WordPress heartbeat API
block_libraryDisable Gutenberg block CSS on frontend
xmlrpcDisable XML-RPC protocol
rest_apiRestrict REST API to logged-in users
application_passwordsDisable application passwords
generatorRemove WordPress version meta tag
shortlinkRemove shortlink from head
rsd_linkRemove Really Simple Discovery link
wlw_manifestRemove Windows Live Writer link
version_stringsRemove ?ver= query strings from assets
adjacent_postsRemove prev/next post links from head
feedsDisable RSS feeds completely

Unknown keys are silently ignored.

Output:

{ "success": true, "message": "2 option(s) updated.", "updated": ["emojis", "heartbeat"] }

Error response:

{ "code": "no_valid_keys", "message": "No valid option keys provided.", "data": { "status": 400 } }

curl example - disable emojis and heartbeat:

curl -s -X POST https://example.com/wp-json/lw-site-manager/v1/abilities/lw-disable/set-options \ -H "Content-Type: application/json" \ -H "X-WP-Nonce: <nonce>" \ -d '{"options": {"emojis": true, "heartbeat": true}}'

curl example - re-enable comments:

curl -s -X POST https://example.com/wp-json/lw-site-manager/v1/abilities/lw-disable/set-options \ -H "Content-Type: application/json" \ -H "X-WP-Nonce: <nonce>" \ -d '{"options": {"comments": false}}'

Note: Changes take effect immediately after saving; a page reload may be needed to observe the frontend effects. The abilities register themselves via action hooks and are completely inert when LW Site Manager is not installed.