LW Disable
Disable WordPress features you don’t need - comments, emojis, embeds, and more.
Overview
| Requires WordPress | 6.0+ |
| Requires PHP | 8.1+ |
| Tested up to | 6.7 |
| License | GPL-2.0-or-later |
| GitHub | lwplugins/lw-disable |
Installation
composer require lwplugins/lw-disableOr 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-allAvailable Features
| Feature Key | Description |
|---|---|
comments | Comments system |
admin_new_user_email | New user admin email |
emojis | Emoji scripts/styles |
embeds | oEmbed system |
heartbeat | Heartbeat API |
block_library | Gutenberg CSS |
xmlrpc | XML-RPC protocol |
rest_api | REST API restriction |
application_passwords | App passwords |
generator | Version meta tag |
shortlink | Shortlink header |
rsd_link | RSD link |
wlw_manifest | WLW manifest |
version_strings | Asset version strings |
adjacent_posts | Adjacent post links |
feeds | RSS 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:
| Field | Type | Required | Description |
|---|---|---|---|
options | object | yes | Map of option keys to boolean values |
Option keys:
| Key | Description |
|---|---|
comments | Disable comments completely |
admin_new_user_email | Disable admin email on new user registration |
emojis | Disable WordPress emoji scripts and styles |
embeds | Disable oEmbed discovery and scripts |
heartbeat | Disable WordPress heartbeat API |
block_library | Disable Gutenberg block CSS on frontend |
xmlrpc | Disable XML-RPC protocol |
rest_api | Restrict REST API to logged-in users |
application_passwords | Disable application passwords |
generator | Remove WordPress version meta tag |
shortlink | Remove shortlink from head |
rsd_link | Remove Really Simple Discovery link |
wlw_manifest | Remove Windows Live Writer link |
version_strings | Remove ?ver= query strings from assets |
adjacent_posts | Remove prev/next post links from head |
feeds | Disable 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.