Description
Loyal Security is a free, lightweight WordPress security plugin that protects your site from hackers, bots and malware. It combines a firewall, malware scanner, two-factor authentication, backups and an activity log in one plugin, and it is built to keep your site fast and your server load low.
Everything is free. No locked features, no trial, no usage limits.
Lightweight and easy on your server
- Attacks are stopped before WordPress loads. In Optimized Mode the firewall runs before WordPress, your database and your plugins start, so bad requests cost your server very little.
- Flood and bot protection. Rate limiting, burst shielding and a bad-bot blocker stop repeat offenders early and help keep your site responsive under attack.
- Heavy jobs run in small background steps. Scans and integrity checks don’t hog your server, and backups check for free disk space before they start.
- Fewer outside requests. Firewall and scanner rules are bundled with the plugin, and WordPress.org checksums are kept locally once verified.
- No bloat. Nothing to compile or install. The dashboard uses the React that already ships with WordPress, and live screens stop refreshing when the browser tab is hidden.
- Storage stays under control. Logs, scan data and backups have limits and retention settings, so your database and disk don’t keep growing.
- Safe by design. If the firewall can’t load, it steps aside instead of breaking your site.
Easy to set up and use
- Setup Wizard — picks the best firewall mode for your hosting and turns it on.
- Plain-language alerts — the dashboard and emails explain what happened and what to do.
- Security Score — an A–F grade for your site, shown in the admin bar.
- Works with any theme, and automatically detects real visitor addresses behind Cloudflare.
Complete WordPress security in one plugin
Firewall and attack protection
- Dual Web Application Firewall — blocks SQL injection, cross-site scripting, file inclusion and other common attacks.
- Brute-force protection — sign-in lockouts, login CAPTCHA and a custom login URL.
- Country blocking — works with or without a CDN.
- Virtual patching — shields vulnerable plugins and themes until you can update them.
- Live Traffic monitor — see requests in real time and block or unblock with one click.
- Server hardening — .htaccess and Nginx rules, wp-config hardening, REST API and XML-RPC restrictions.
- CSP – Content Security Policy manager — builds a policy from what your site actually loads, with a report-only mode.
Malware scanning and clean-up
- Malware scanner — on-demand scans plus an automatic weekly scan.
- File integrity monitoring — compares core and plugin files with official WordPress.org checksums and alerts you when files change.
- Database scanner — finds injected scripts, spam links and rogue admin accounts.
- Vulnerability notices — flags plugins and themes with known security issues on your Plugins, Themes and Updates screens.
- Safe clean-up — quarantine suspicious files and restore clean copies in one click.
Login security
- Two-factor authentication — authenticator apps, passkeys and backup codes.
- Password policy and breached-password warnings, plus session management.
Backups, logs and alerts
- Backup and restore — scheduled or on-demand, with a recovery tool that works even if WordPress won’t load.
- Audit log — who did what, with CSV export.
- Email notifications — with throttling, quiet hours and per-event muting.
- WP-CLI commands —
wp loyal-security status | scan | firewall | backup | twofa.
Loyal Security Pro
Loyal Security Pro is a separate plugin for people who run security across many sites. You don’t need it for anything listed above. It adds:
- Sentinel AI — AI-assisted review of suspicious activity with reversible responses and autonomous site protection mode.
- Hourly threat-intelligence updates, plus extra firewall and malware rules published for Pro sites.
- Under Attack Mode — a one-click emergency shield with automatic expiry.
- Faster scheduled scans and auto-quarantine — daily or twice-daily scans, with infected files isolated the moment they are found.
- Threat hunting, uptime monitoring and compliance reports.
- Webhook, PagerDuty and OpsGenie alerts, and Cloudflare edge sync.
- WooCommerce-aware backups and staging restores.
- Agency tools — white-label dashboard, role management and a multi-site hub.
External services
Everything runs on your own server. By default the plugin contacts only three services, and each can be switched off in Settings. Everything else stays off until you turn it on or click a button. The plugin’s own requests identify themselves as LoyalSecurity/<version>, and your site’s URL, visitors’ personal data and content are never sent unless stated below.
Loyal Security threat-intelligence service (licensekit.loyalsecuritywp.com) — on by default
Used twice a day, and when you click “Sync now”, to update the vulnerability database and receive new firewall rules, malware signatures and virtual patches. It sends the dataset name and version, the feed channel (“free” or “pro”), the Pro subscription key if one is stored, and, for the vulnerability dataset only, the slugs (folder names) of your installed plugins and themes so you only get relevant advisories. Turn it off in Settings Threat Intelligence (“Sync the threat feed automatically” or “Enabled”); the plugin keeps using the rules it has.
Only when you use them:
- The “About Pro” screen fetches the public plan list. No site data is sent.
- “Test connection” sends a timestamp, an anonymous install ID and, if present, a hash of the subscription key.
- Firewall-bypass reports are off until an administrator consents under Loyal Security Bypass Telemetry (in the Advanced view; you can withdraw at any time). They send the attacking request (method, path, parameters, IP address, country), the matching rule names, plugin/WordPress/PHP versions (major.minor) and an anonymous install ID, with cookies, authorization headers and nonces removed.
- With the same consent, a virtual patch you approve can be shared as a rule suggestion. It sends the rule and its category, the plugin version, a timestamp, an anonymous install ID and, if present, a hash of the subscription key.
Have I Been Pwned (api.pwnedpasswords.com) — on by default
At login, to warn users whose password appears in a known breach. Only the first five characters of the password’s SHA-1 hash are sent (k-anonymity), never the password, username or email address. It never blocks a login. Turn it off in Settings Identity & Access “Check passwords against known breaches”.
WordPress.org (api.wordpress.org, downloads.wordpress.org, core.svn.wordpress.org) — on by default
File integrity checks download the official checksums for WordPress core and your WordPress.org plugins (plugin slug and version), automatically each week and whenever you start a check. Repair or reinstall downloads the official package or file. These are the same public services WordPress uses for updates, and these requests go through WordPress’s own functions, so they use WordPress’s standard user agent, which includes your site address, exactly as WordPress updates do. Turn off the scheduled check, or the whole module, in Settings File Integrity Monitoring.
Privacy policy · WordPress.org publishes no separate terms for these endpoints; the software is governed by the GPL.
Cloudflare Turnstile (challenges.cloudflare.com) — only if you choose it
Only if you select Turnstile as your login CAPTCHA and enter your keys. The script loads on the login form, and the visitor’s CAPTCHA token and IP address are sent to Cloudflare to verify it.
Terms · Privacy policy · Turnstile addendum
Google reCAPTCHA v3 (www.google.com) — only if you choose it
Only if you select reCAPTCHA v3 as your login CAPTCHA and enter your keys. The script loads on the login form, and the visitor’s CAPTCHA token and IP address are sent to Google to verify it.
Google Safe Browsing (safebrowsing.googleapis.com) — only if you add a key
Only if you enter your own API key under Settings Hardening. Your site’s home URL is sent to check whether Google has flagged it. Nothing is sent without a key.
Content Security Policy scanner — only when you click “Scan”
To suggest which domains your policy should allow, the scanner loads a few of your own pages and the external stylesheets they already use (such as Google Fonts or a CDN), with a plain request that carries no site data. Those providers’ own terms apply, exactly as when a visitor loads your site.
Your server’s DNS
To confirm that a visitor claiming to be Googlebot, Bingbot or similar really is one, the plugin does a reverse and forward DNS lookup of the visitor’s IP address through your server’s normal resolver. The result is cached.
Screenshots




Installation
- Install the plugin from Plugins Add New, or upload the
loyal-securityfolder to/wp-content/plugins/. - Activate it.
- Open Loyal Security in the admin menu and run the Setup Wizard. It sets up the firewall in the best mode for your hosting.
- Turn on two-factor authentication for your admin accounts.
Requires PHP 8.0 or later. If your host doesn’t support the faster Optimized Mode, the plugin uses Standard Mode automatically.
FAQ
-
Is anything limited or locked?
-
No. Every feature in this plugin is complete. Loyal Security Pro is a separate plugin with extra features; installing it unlocks nothing here.
-
Will it slow down my site or increase server load?
-
It is built not to. In Optimized Mode the firewall runs before WordPress loads, so malicious requests are blocked before WordPress, the database or your plugins start. Scans and integrity checks run in small background steps, and storage for logs and backups is limited. If your host can’t run Optimized Mode, Standard Mode still runs as early as possible inside WordPress.
-
Can I use it with another security plugin?
-
You can, but two firewalls or scanners at once can conflict. We recommend turning off other firewall plugins first. If you are switching from Wordfence, Sucuri or Solid Security, Loyal Security can import their IP block and allow lists from your own database. It only reads them and sends nothing anywhere. It is not affiliated with those products.
-
Does it work behind Cloudflare?
-
Yes. Real visitor addresses are detected automatically. For another proxy or load balancer, add its address under Firewall Trusted proxies.
-
What if the firewall breaks my site?
-
It is built to fail safe: if its files are missing, it does nothing instead of breaking your site, and the Setup Wizard rolls back automatically if its self-test fails.
If your site still won’t load, open
.htaccess(or.user.ini) in your site’s root folder and delete the Loyal Security block: the lines between# BEGIN Loyal Security WAFand# END Loyal Security WAF, or theauto_prepend_fileline that mentions Loyal Security. On.user.inisites PHP can take up to five minutes to notice. Once the site loads, switch the firewall to Standard Mode in Loyal Security, or the next plugin update will turn Optimized Mode back on. If you can’t edit the file, ask your host. -
What happens to my data if I delete the plugin?
-
Your logs, scan history and settings are kept in case you reinstall. Firewall and server changes are always removed. For a full wipe, turn on “Delete all data on uninstall” under Settings first.
-
Where does the country data come from?
-
From Cloudflare or your trusted proxy when available. Otherwise from a table bundled with the plugin: IP Geolocation by DB-IP, licensed CC BY 4.0. Looking up an address never contacts an outside service. Admin screens and emails that show a country link to DB-IP; the visitor-facing block page only does if you turn on “Show the DB-IP credit on the block page” in Firewall settings.
-
How do I report a security issue in the plugin?
-
Please report it privately through our support page, not in the public support forum, so it can be fixed first.
Reviews
Contributors & Developers
“Loyal Security – Firewall & Malware Scanner” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Loyal Security – Firewall & Malware Scanner” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.6.0
- New: Multisite support for Optimized Mode. A super admin sets it up once from the main site and it covers the whole network.
- New: Smarter bot recognition. Search engine, social preview, uptime monitor and AI crawlers are verified by their published IP addresses as well as by DNS.
- New: The firewall whitelist accepts IP ranges (CIDR, IPv4 and IPv6).
- New: Choose whether vulnerability warnings appear on the Plugins and Themes screens.
- New: “Add all to CSP” in the Content Security Policy violation log, with a confirmation step.
- Improvement: Lighter on your server. Integrity checks, scans and Content Security Policy reporting do less work, and long jobs run in small background steps.
- Improvement: Simpler DDoS / Burst Protection settings, and clearer Active bans, Bot management and CSP screens.
- Improvement: Content Security Policy Report-Only learning now samples about 1 in 10 page views, so collecting reports costs a busy site very little. On quiet sites, choose “every page view” under “Send reports from” in the CSP settings.
- Improvement: Better keyboard and screen-reader support in admin dialogs and controls.
- Change: Two-factor trusted devices now start fresh whenever two-factor is turned off or set up again. Users who had trusted devices are asked for a code once after updating.
- Fix: Several stability and compatibility fixes for integrity findings, CSP reports, database upgrades and custom bot rules.
1.5.6
- Fix: Optimized Mode is refreshed automatically after the plugin is updated.
1.5.5
- Fix: Two-factor recovery codes now work with current WordPress password hashing.
- Fix: Custom Login URL handling of redirects and login-related links. On Nginx, see the updated server rules in the plugin.
- Fix: Passkey sign-in works on sites that require REST API authentication.
- New: The burst/DDoS shield now works in Optimized Mode, stopping floods before WordPress loads.
- New: Repeat flooding from the same address is banned for progressively longer, up to a limit you set.
- New: Burst-shield settings, a “Recommended for your server” suggestion, and a Detection-only test mode.
- New: Warnings when a flood-protection value is too tight or too loose for your server.
- New: Optional web-server-level IP blocking for Apache and LiteSpeed, self-tested and rolled back automatically if the site stops answering. Nginx servers get a deny-list include file. Not effective behind a CDN, where the web server only sees the CDN’s address.
- Fix: Improved Optimized Mode stability and activation handling, including right after an update.
- Fix: Reduced first-request overhead after updating a site in Optimized Mode.
- Fix: The Setup Wizard recognises OpenResty, Angie and Tengine as nginx-style servers.
- Fix: Vulnerability findings link to the matching virtual patch whether it is built in or delivered by the feed.
- Fix: IPv6 addresses are handled consistently in bans and allowlists in both firewall modes, and existing bans are updated automatically.
- New: Signed file manifests let the integrity scanner verify Loyal Security and Loyal Security Pro files offline.
- Fix: Integrity checks use the current signed manifest after updates.
- Fix: The malware scanner ignores the plugin’s own repair-backup copies.
- Fix: Hardening checks on nginx-style servers no longer raise false file-exposure warnings.
- Fix: Vulnerability information refreshes after each scheduled feed sync.
- Fix: Settings search scrolls to toggle switches.
- Fix: Passkey sign-in button spacing.
1.5.0 – 1.5.4
- New: Fully translatable. Translations from translate.wordpress.org load automatically.
- New: Country blocking now works without a CDN, using bundled IP-to-country data.
- New: Real visitor IP detection behind Cloudflare, Azure and other proxies.
- New: Author privacy options: redirect or hide author archives, and hide author names.
- New: Optional Strict-Transport-Security, Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy headers.
- New: Custom login URL on Nginx, with server rules to copy before saving.
- New: Audit log controls, storage limits for everything the plugin keeps, a free-space check before backups, and
wp loyal-security logs stats|prune. - New: The Attack Surface Scan tests whether sensitive files can actually be downloaded.
- Improvement: Updated firewall signatures and wider request inspection after an independent penetration test, with more vulnerability scanners blocked.
- Improvement: Far fewer false positives on checkouts, forms, webhooks, editors and integrations (application passwords, WooCommerce API keys, Jetpack, WPML, Polylang).
- Improvement: Too many failed sign-ins now lock sign-in only, not the whole site. Routine alerts the firewall already handled no longer send email.
- Improvement: Wider malware and database scanning, with fewer false alarms for third-party plugins.
- Improvement: Forwarded visitor addresses are read more strictly. If your site sits behind more than one proxy, add each of them under Firewall Trusted proxies.
- Improvement: On multisite, only super admins manage Loyal Security.
- Improvement: Plugin data is stored in a private folder, moved automatically when you update.
- Fix: Many stability, accuracy and display fixes across the firewall, scanner, Live Traffic, integrity monitoring, hardening and the Setup Wizard.
1.4.8 – 1.4.14
- Change: Passkey sign-in goes through the standard WordPress login form, and the breached-password check has an on/off setting.
- New: The standalone recovery tool is downloaded from Backup & Recovery and uploaded by you.
- Improvement: More reliable backups and restores, with checksum verification for database backups.
- Improvement: No feature limits. Full scan history, Live Traffic with filters and payload details, and configurable audit log and backup retention.
- Improvement: Hardened input handling, output escaping and database queries.
- Change: The REST namespace is now
loyal-security/v1and the management capability ismanage_loyal_security. Roles you granted access to are moved across automatically. - Change: Requires WordPress 6.6 or later.
1.0.0 – 1.4.7
- Initial releases introducing the dual-mode Web Application Firewall, heuristic malware detection, file integrity monitoring, two-factor authentication, database scanning, and live traffic monitoring.
