giantpeach/wp-sane-defaults
Composer 安装命令:
composer require giantpeach/wp-sane-defaults
包简介
WordPress mu-plugin that fixes common insecure and annoying defaults.
README 文档
README
WordPress mu-plugin that fixes common insecure and annoying defaults.
What it does
Security:
- Disables the Users REST API endpoint for unauthenticated requests
- Disables XML-RPC entirely
- Removes the X-Pingback header
- Disables file editing via the admin
- Obscures login error messages to prevent user enumeration
- Disables author archives (redirects to homepage)
- Removes WordPress version from scripts, styles, and meta tags
Performance/Cleanup:
- Removes emoji scripts and styles
- Removes oEmbed discovery links
- Removes DNS prefetch for
s.w.org - Only loads comment-reply JS when actually needed
- Removes unnecessary meta tags (generator, WLW manifest, RSD link, shortlink, REST API link, feed links)
- Disables self-pingbacks
- Hides update nags for non-admin users
Installation
Drop wp-sane-defaults.php into wp-content/mu-plugins/.
Requirements
- PHP 8.0+
- WordPress 6.0+
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-04