# Hardening for WordPress

> Switch off XML-RPC and the file editor, hide the WordPress version, stop username discovery, and limit the REST API for visitors. Part of Toggleworks, one…

TW-SEC-07 Security


Switch off XML-RPC and the file editor, hide the WordPress version, stop username discovery, and limit the REST API for visitors.

[Get it from $26 a year](https://togglework.app/pricing/#plans) [Try it in the demo](https://togglework.app/demo/)

Hardening

**Part number**
: TW-SEC-07
**Section**
: [Security](https://togglework.app/features/security/)
**Settings**
: 10 (8 on/off)
**Starts**
: Switched off
**In plans**
: Every plan

## Why it matters

WordPress ships with a few features switched on that most sites never use but attackers do: XML-RPC for password guessing and pingback floods, the in-admin code editor for planting backdoors, and public endpoints that list every username.

Hardening switches those off, so there is less to attack in the first place.

### What it does

- Turns off XML-RPC pingbacks, or XML-RPC completely.
- Removes the theme and plugin file editor from wp-admin.
- Hides the WordPress version and blocks username discovery (?author=N, the REST users endpoint, user sitemaps).
- Shows generic login errors, so bots can’t tell which usernames exist.
- Optionally disables application passwords, blocks plugin and theme changes from the admin, or requires login for the REST API.

![Hardening settings screen in the Toggleworks WordPress plugin, showing XML-RPC, Disable the theme and plugin file editor, Block all plugin, theme and core changes from the admin, Hide the WordPress version](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/security-hardening.webp?v=1795524231)

The Hardening screen in wp-admin, where you switch it on and change its settings.

## Set it up

1. Switch Hardening on. The defaults are safe for nearly every site.
2. If you use Jetpack or the WordPress mobile app, keep XML-RPC on and turn off pingbacks only.
3. Leave the REST API login requirement off unless you have tested forms, shop and embeds with it.

## What you can set

Switch Hardening on in Toggleworks → Security, then adjust any of these. Each one starts with a default, so you can switch the part on first and fine-tune later.

- XML-RPC
- Disable the theme and plugin file editor
- Block all plugin, theme and core changes from the admin
- Hide the WordPress version
- Block username discovery for visitors
- Generic login errors
- Disable application passwords
- Remove the X-Pingback header
- Require login for the REST API
- Public REST routes

## Good to know

- Requiring login for the REST API can break contact forms, WooCommerce blocks and embeds. Add their routes to the public list if you use it.
- Blocking plugin and theme changes from the admin is for sites updated by deployment. You won’t be able to update from wp-admin while it is on.

[Guide: The WordPress security checklist, in the order that matters](https://togglework.app/guides/wordpress-security-checklist/)

## One less plugin to install

Hardening does a job people often install a separate plugin for:

- Hardening WordPress settingsOften done with Solid Security

## Comes with 187 more parts

Hardening is one part of Toggleworks, a single plugin for security, speed, SEO, backups, email and store tools. Switch on what your site needs; the rest stays off and loads nothing.

[All 18 Security parts](https://togglework.app/features/security/)

### People also look for it as

- xmlrpc
- pingback
- file editor
- version
- generator
- user enumeration
- rest api
- application passwords
- login errors
- x-pingback

## Often switched on with it

- [Login Lockdown](https://togglework.app/features/security/login-lockdown/) — TW-SEC-09 · Block an IP address (and optionally a username) for a while after too many failed logins, including XML-RPC. Locked out yourself?… · 8 settings
- [AI Image Generator](https://togglework.app/features/ai/image-generator/) — TW-AI-13 · Generate featured images and illustrations from a sentence, or edit an image you already have (“remove the background”, “make it… · 7 settings
- [Disable Bloat](https://togglework.app/features/performance/disable-bloat/) — TW-PRF-06 · Switch off WordPress extras most sites never use: emojis, embeds, jQuery Migrate, feed links, extra head tags and more. · 21 settings
- [Activity Log](https://togglework.app/features/security/activity-log/) — TW-SEC-01 · Keep a record of logins, user and role changes, plugin and theme changes, core updates, content changes and key settings. · 2 settings
- [CAPTCHA](https://togglework.app/features/security/captcha/) — TW-SEC-02 · Stop bots on the login, registration, lost password and comment forms with a simple math question or Cloudflare Turnstile. · 4 settings
- [Content Protection](https://togglework.app/features/security/content-protection/) — TW-SEC-03 · Make casual copying harder: block right click, text selection, copy and paste, image dragging, printing and the view-source /… · 5 settings

## Questions

**Is Hardening included in every Toggleworks plan?**

Yes. Every plan includes all 188 parts, Hardening among them. Plans differ only in how many sites you can use them on, and staging or local copies of a site don’t count.

**Does Hardening slow my site down when it’s switched off?**

No. Every part starts switched off, and a part that is off loads none of its code. Switch on Hardening only if your site needs it.

**What if a setting locks me out?**

Add `define( 'TOGGLEWORKS_SAFE_MODE', true );` to wp-config.php. It pauses every part until you remove the line, and Tools → Recent changes lets you undo a change.

**Can I try Hardening before I buy?**

Yes. The [live demo](https://togglework.app/demo/) runs a WordPress site with Toggleworks in your browser, and every plan has a 14-day refund.

## Switch off the plugin pile.

All 188 parts, one license, updates and support. 14-day refund.

[Choose a plan](https://togglework.app/pricing/#plans) [Try the live demo](https://togglework.app/demo/)

---

Source: https://togglework.app/features/security/hardening/
