
DoctorX Hardening
v0.19.1xaviercode · 2026年11月9日 上架
Simple security for WordPress: hides your usernames and plugin list, adds a phone code to sign-in, and records who changed what.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 335
- 最近更新
- 2026年11月25日
贡献者
截图





DoctorX Hardening makes your WordPress site harder to break into. It closes a few doors that WordPress leaves open, lets people add a code from their phone when they sign in, and can keep a record of who did what on your site.
You do not need to know anything about security to use it. Turn it on and the main protections work right away. Everything is free. Nothing is locked and there is no paid version.
What it does as soon as you turn it on
- Hides your usernames. Normally anyone can look up the usernames on a WordPress site. A username is half of what someone needs to break in. Visitors can no longer see them.
- Hides your list of plugins. Normally WordPress tells anyone who asks which plugins your site runs. Attackers use that list to look for a weak one. Visitors no longer get it.
- Keeps author pages from giving names away. Links to author pages now go to your home page. If your site shows author pages on purpose, switch this one off.
- Stops a small WordPress guess. When someone types a short address like /fr/ that does not exist, they get “page not found” instead of being sent to a page with a similar name.
- Offers two-step sign-in. Each person can choose to type a 6-digit code from a free phone app after their password. Then a stolen password alone is not enough to get in. Nobody has to use it unless you make it required.
Each one has its own on/off switch under Settings Hardening.
Extra protections you can switch on
These are all off until you switch them on. Each one says how to undo it.
- Lock out password guessers. An internet address that gets the password wrong 5 times in a day cannot sign in for 30 days. You choose addresses that are not locked out, such as your office.
- Require two-step sign-in for the roles you choose, such as administrators, from a date you pick.
- Email a code to someone who does not have their phone with them.
- Close little-used doors: XML-RPC (an old way for apps to sign in), app passwords, and the WordPress version number shown in your pages.
- Hide your sign-in page at an address only you know. Not for shops or member sites, where visitors sign in themselves.
- Block scanners. A visitor who asks for secret files that only hacking tools look for is blocked from the whole site for 7 days. Search engines are not blocked.
- Activity record. See who signed in, who failed to, and who changed posts, pages, plugins, settings or users, and when. Get an email, Slack, Teams, Discord or Telegram alert when something important happens.
- security.txt. A small standard file that tells someone who finds a security problem on your site how to reach you.
- Cloudflare rules, if your site uses Cloudflare. Add ready made blocking rules with one button and take them away with another.
- Ready made lines for your web server, for you or your web host to copy in.
- A down page for every site of a network. Set the wording and look once for the network, or per site. Each site’s page is written to a small file the web server shows while PHP cannot answer. WordPress shows the same page while the database cannot answer, unless the site already has a db-error.php of its own. The screen shows whether each site’s file is current.
- The visitor’s own address behind your proxies. Name the proxies your site sits behind (Cloudflare’s published addresses, kept current with an Update button, or your host’s own proxy). Only requests from them may say who the visitor is. Every limit and the activity record then use that address, and the screen shows the address your site sees for you.
- Content policy reports. See what a content policy would block, in report-only form (nothing is blocked). A table on Settings Hardening groups the reports and suggests what to add, such as “add https://example.com to script-src”. No visitor address is kept, and reports go after 30 days.
- Where visitors come from. See the top cities and countries of your visitors over the last 7 and 30 days. It uses DB-IP’s free city file, which you download with a button. Only a count per city and day is kept, and nothing that names a person.
- Very large picture folders and Wordfence. If Wordfence’s scan runs out of memory on a very large folder of pictures, the screen offers to leave that folder out of the scan, once a test shows that PHP cannot run there.
- A “not found” count. An address that gets 40 “not found” answers within five minutes is banned like a scanner. Missing pictures, scripts and fonts, crawlers and signed-in people are not counted.
- A watch on many addresses at once. See, in five-minute windows, how many addresses ask for pages and how many are turned away, for the last three hours. You can have one short mail when a wave comes.
- Two-step sign-in on the website. A shortcode puts the set-up panel on a page of your website for signed-in clients, and people who must use an authenticator app can be asked for it on every page.
- A header for Cloudflare APO, that tells it which pages it may keep for visitors who are not signed in.
What it does not do
So you know where its job ends:
- It is not a virus or malware scanner. It does not clean a site that has already been hacked.
- It does not check every visit for attacks the way a firewall service does.
- It does not make backups.
- It does not update or fix your other plugins and themes. Keep them up to date.
- It does not change what visitors, search engines or AI assistants see on your pages. Your search ranking is not affected.
- Hiding things makes an attack harder, not impossible. Strong passwords and updates still matter.
- It sends nothing about your site or your visitors to DoctorX or anyone else. The outside services listed further down (such as Cloudflare or Slack) are only used if you set them up yourself.
Who it is for
Any WordPress site owner who wants the common holes closed without learning security. It works with any theme and needs no other plugin.
Made by DoctorX.ca.
External services
Nothing in this plugin talks to an outside service until you ask it to. None of the outside services below is used on a website set up not to send (DOCTORX_HARDENING_MAY_CONNECT set to false, or the doctorx_hardening_may_connect filter), such as a staging copy, except WordPress.org’s checksums (which WordPress itself also fetches), the look-up of trusted host names by your server’s DNS resolver, and requests to your own site’s address.
-
Cloudflare API (https://api.cloudflare.com/client/v4), only after you save a Cloudflare API token of your own on Settings Hardening Sign-in and server, and only for what you press there or switch on. That is:
- listing the zones the token can see
- reading a zone’s custom firewall and rate-limit rules (Preview)
- reading the zone’s cache rules, once a day, for the self-check (read only)
- adding, changing or putting back rules (Apply, Undo, Copy), on the zones you ticked for your trusted addresses too
- with “When a trusted host name points to a new address, change it in the DoctorX rules on the ticked zones by itself” ticked, reading those zones’ rules (and this site’s own zone when DoctorX rules are applied there) and changing that one address in the DoctorX rules, when a trusted name’s address changes
- with a zone ticked for your trusted addresses, or the follow box ticked, reading the rules of each of those zones once, when the screen is opened, at Save, or with the follow box ticked at the next look-up (and of this site’s own zone when DoctorX rules are applied there)
- on “Preview” and “Apply” under “DoctorX rules that still hold an old address”, reading the zones named there and changing that address in those rules
- sending the probe ban’s addresses as IP access rules (Send them now), and with “Send new bans to Cloudflare by themselves” ticked, the same list about a minute after an address is banned (bans that ended are taken away)
- with “When a page changes, have Cloudflare forget it” (or DoctorX Command Center’s “Empty caches”), the addresses of changed pages or a “forget everything” request.
Sent: the token (as the request’s authorisation), the zone’s id, the rules this plugin generates (your host names, your trusted addresses, the hidden door’s address when it is on), banned internet addresses, and page addresses. Nothing about your visitors or accounts is sent. Cloudflare’s terms: https://www.cloudflare.com/website-terms/ and privacy policy: https://www.cloudflare.com/privacypolicy/
- Cloudflare’s published address lists (https://api.cloudflare.com/client/v4/ips, no token needed), only when you press “Update Cloudflare’s list” on Settings Hardening Sign-in and server. Nothing is sent but the request for the lists. Cloudflare’s terms: https://www.cloudflare.com/website-terms/ and privacy policy: https://www.cloudflare.com/privacypolicy/
- DB-IP (https://download.db-ip.com), only when you press the city database button under “Where visitors come from”: your site downloads the month’s free city file. Nothing is sent but the request for the file. No visitor’s address goes to DB-IP: addresses are looked up in the file on your own server. DB-IP’s terms: https://db-ip.com/tos.php and privacy policy: https://db-ip.com/privacy.php
- ipinfo.io (https://ipinfo.io), only when you choose “ipinfo.io” under “Where addresses are” on the activity record’s More settings screen, save your own token, and an administrator opens an address in the record: that one internet address and your token. ipinfo’s terms: https://ipinfo.io/terms-of-service and privacy policy: https://ipinfo.io/privacy-policy
- Google Maps Static API (https://maps.googleapis.com), only when you switch on the sign-in map and save your own Google Maps key, and only when an administrator opens the map. Sent: up to 60 rounded map points (latitude and longitude to three decimals, about 100 metres) and your key. No addresses, names or accounts are sent. Google’s terms: https://cloud.google.com/maps-platform/terms and privacy policy: https://policies.google.com/privacy
- Alerts, only to the destinations you add on the activity record’s More settings screen (Alerts) and only for the rules you set. Sent: the alert’s subject, text and a link to the record. For a webhook, also your site’s address, the rule’s name and the event (as below). The destinations can be:
- Slack (the webhook address you paste). Terms https://slack.com/main-services-agreement and privacy https://slack.com/trust/privacy/privacy-policy
- Discord. Terms https://discord.com/terms and privacy https://discord.com/privacy
- Microsoft Teams. Terms https://www.microsoft.com/en-us/servicesagreement and privacy https://www.microsoft.com/en-us/privacy/privacystatement
- Telegram (api.telegram.org with your bot’s token and chat). Terms https://telegram.org/tos and privacy https://telegram.org/privacy
- any address of your own that takes JSON, signed with your secret if you set one.
- Log forwarding, only when you switch it on on the activity record’s More settings screen and switch on a destination with its connection details. Sent: every event as it is written, with its date, kind, level, message, who did it (user id, login and email address), the internet address and any addresses passed on by a proxy, the browser’s user agent, what it was about, the event’s details and your site’s address. (Writing to this server’s own system log is not an outside service and also happens on a website set up not to send.) The destinations can be:
- this server’s own system log
- a syslog server you name (UDP, TCP or TLS)
- Datadog’s Logs API with your key. Terms https://www.datadoghq.com/legal/terms/ and privacy https://www.datadoghq.com/legal/privacy/
- Splunk’s HTTP Event Collector with your token. Terms https://www.splunk.com/en_us/legal/splunk-general-terms.html and privacy (Splunk is part of Cisco) https://www.cisco.com/site/us/en/about/legal/privacy.html
- any webhook address of yours.
- WordPress.org (https://api.wordpress.org), only when you switch on “Check WordPress’s own files once a day” in the activity record’s settings: once a day, your WordPress version and language, to fetch the official checksums of WordPress’s files (the same request WordPress makes for its own updates). WordPress.org’s privacy policy: https://wordpress.org/about/privacy/
- Your server’s DNS resolver, in two cases only. When you switch on “Also ask for the address’s host name” and an administrator opens an address in the record: that one internet address, to look up its host name (reverse DNS). And when you write a host name on the trusted list: that name, every 15 minutes, to learn the address it points to now. With a name on the list, your site’s own host name is looked up as well, so that a name pointing at your own server is not trusted.
- The emails this plugin sends (sign-in codes, the hidden door’s address, notes about two-step sign-in, and with “Mail me when a wave comes” ticked a short note to the administration address) go through your site’s own mail setup to your own people.
- Your own site’s address, which passes through your proxy or CDN if you have one. Once a day, for the self-check: a few requests to your own site (a probe file in each private folder and a private probe page). When you press “Check again” for very large picture folders: the small test files, deleted at once. When you have the starting content policy built from your site: up to 12 of your own public pages. Nothing is sent to anybody else.
- The crawler-list script on the “Lines for your web server” screen is a file you download and run on your server yourself: it fetches the address lists at developers.google.com, www.bing.com, search.developer.apple.com, duckduckgo.com, openai.com, www.perplexity.ai and www.cloudflare.com. The plugin itself does not fetch them.
Source code and credits
All code is included unminified. The picture you scan when setting up two-step sign-in is drawn in the browser by QR Code Generator for JavaScript by Kazuhiko Arase (MIT licence), included unchanged in assets/vendor/qrcode-generator.js. The word “QR Code” is a registered trademark of DENSO WAVE INCORPORATED.