=== Defender Security - Malware Scanner, Login Security & Firewall ===
Plugin Name: Defender Security - Malware Scanner, Login Security & Firewall
Version: 5.8.1
Author: WPMU DEV
Author URI: https://wpmudev.com/
Contributors: WPMUDEV
Tags: security, malware, firewall, malware scanner, login security
Requires at least: 6.4
Tested up to: 6.9
Stable tag: 5.8.1
Requires PHP: 8.0.0
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

WordPress security plugin with malware scanner, IP blocking, audit logs, antivirus scans, firewall, 2FA, brute force login security, and more.

== Description ==

**Defender adds the best in WordPress plugin security to your website with just a few clicks, including malware scanner, firewall, password protection, and login security features. Stop brute force login attacks, weak password usage, SQL injections, cross-site scripting (XSS), and other WordPress security vulnerabilities and hacks with Defender’s malware scanner, providing antivirus scans, IP blocking, firewall, activity log, security log, and two-factor authentication (2FA) login security.**

No more complex security settings, Defender's malware scanner, firewall, and login security features add all the hardening and security you need.

Defender is brought to you by the WordPress speed specialists that created Smush image optimization, now active on more than +1 million websites.

Plus, connect for free to WPMU DEV’s AntiBot Global Firewall to block harmful IPs with data from over 500,000 sites.

**Enjoy complete site protection from malware, vulnerabilities, bot attacks, and session hijacking from the start with [Defender Pro](https://wpmudev.com/project/wp-defender/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=defender-readme-above-the-fold&utm_content=wp_defender_pro).**

Level up security immediately with exclusive Pro features like scheduled malware scanning, Safe Repair for suspicious files, and known WordPress vulnerability detection. [Learn more about Pro](https://wpmudev.com/project/wp-defender/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=defender-readme-above-the-fold&utm_content=wp_defender_pro).

### Security Recommendations

Defender's one-click security hardening recommendations instantly adds layers of protection and security to your site.

### Enhance Security and Block Hackers At Every Level:

* **Malware Scanner** - Scan WordPress core files for modifications and unexpected changes which may be caused by malware. Scan for malware and tighten up the security of your files.
* **Outdated & Removed Plugins** – Scans for plugins removed from WordPress.org or not updated in 2+ years.
* **AntiBot Global Firewall** - Connect for free to WPMU DEV to block harmful IPs with data from over 500,000 sites.
* **WordPress Security Firewall** - Block or allowlist IPs, implement IP blocking, and Geo IP blocking, user agent banning and protect against brute force attacks.
* **Two-Factor Authentication (2FA)** - Easily set up better security with 2FA to prevent most login attacks such as brute force, App verification, backup codes, lost device email, WooCommerce 2FA, and Web Authentication.
* **Login Masking** - Change the location of WordPress's default login area to improve login security.
* **Login Lockout** - Failed login attempts lockout for even more security assurance.
* **User Agent Banning** - Fortify security by blocking bad bots and user agents from accessing your site.
* **Security Headers** - Add an extra layer of defense security and protect against common attacks like: XSS, code injection, and more.
* **404 Detection Security** - Automated block of bot IPs.
* **Security Configs** - Create your ideal Defender security plugin settings and export / import saved configs to any other site.
* **Geolocation IP Lockout Security** - Block users based on location and country (IP blocking).
* **Disable Trackbacks And Pingbacks** - Disable these notifications to enhance spam protection and site security.
* **Core And Server Update Security Recommendations** - Stay on top of your system security.
* **Antivirus Scan** - Scan for active security threats, viruses, and other malware.
* **Disable File Editor** - If they get in, they won't get far.
* **Hide Error Reporting** - Hide code errors on the frontend so hackers can’t exploit site security.
* **Update Security Keys** - Update old WordPress security keys to be more encrypted and provide better security.
* **Prevent Information Disclosure** - Improve server security and protect sensitive files by locking down specific file types.
* **Prevent PHP Execution** - Defender bolsters security by automatically preventing any PHP code from being executed.
* **Bulk Apply Security Recommendations** – Apply multiple recommended security improvements at once for quicker site hardening.
* **Google reCAPTCHA Security** - Easy to add, stop fraud and abuse - including BuddyPress and WooCommerce.
* **Cloudflare Turnstile** - Protect your site from spam and automated attacks without annoying captchas.
* **Pwned Password Check** - Increase security by protecting against compromised passwords.
* **Force Password Reset** - Force users with selected roles to reset passwords.
* **Force Strong Passwords** – Ensure users create secure credentials by enforcing robust password requirements.
* **User Agent Blocklist Presets** – Easily block unwanted bots and scripts using curated user agent presets.
* **Known Vulnerability & Suspicious Code Scan (Pro Only)** – Scan WordPress core, themes, and plugins for vulnerabilities and harmful code.
* **Malicious Bot Detector (Pro Only)** – Block malicious bots with layered defenses, including traps for bots that ignore robots.txt and checks for fake crawlers posing as search engines.
* **Google Blocklist Monitoring (Pro Only)** – Get instant alerts if your site is flagged by Google.
* **Session Protection (Pro Only)** – Stop session hijacking and prevent unauthorized account access.
* **Safe Repair For Suspicious Files (Pro Only)** – Restore or replace compromised files safely with a single click.
* **Automated Reports (Pro Only)** – Receive scheduled security reports straight to your inbox.

### Learn The Ropes With These Hands-On Defender Security Plugin Tutorials

* [How to Get the Most Out of Defender Security](https://wpmudev.com/blog/how-to-get-the-most-out-of-defender-security/)
* [How to Stop Hackers in Their Tracks with Defender Security](https://wpmudev.com/blog/stop-hackers-with-defender-wordpress-security-plugin/)
* [Find Out if You're Hacked: How to Find and Delete Suspicious Code with Defender Security](https://wpmudev.com/blog/delete-suspicious-code-defender/)
* [How to Create a Powerful and Secure Customized Firewall with Defender Security](https://wpmudev.com/blog/defender-ip-address-lockout-firewall/)

### WordPress Security Scans
Defender's malware scanner security checks for suspicious code and malware. It also compares your WordPress install with the WP directory master copy, and reports any changes so you can restore the original file with a click.

### Two-Factor Authentication (2FA) Security

Easily add an extra layer of protection and security to your WordPress sites with Defender's two-factor authentication (2FA) features. Including: mobile app verification (Google Authenticator, Microsoft Authenticator, Authy), backup code generation, lost device emails, WooCommerce 2FA, Biometric Authentication (fingerprint/facial recognition), and Hardware Key Authentication (USB security keys). Easily prevent brute force attacks and login security vulnerabilities.

### Login Protection

Brute force attacks are no match for Defender's login security. Limit login attempts so hackers can't guess passwords. Permanently ban IPs or trigger a timed lockout after a set number of failed login attempts. Use Geo IP blocking to ban users from specific countries or locations.

### Firewall Security and IP Manager

Improve your website security with Defender's IP manager and firewall. Manually block specific IPs, import a list of banned IPs, and set automated timed and permanent lockouts. Defender makes it easy to block and unblock specific locations quickly thanks to its advanced firewall security(WAF) offering Geographical IP blocking.

### User Agent Banning

Add user agents to the block or allowlist and stop bad bots from spamming and scraping your site. All major search engines and special network bots are allow-listed out of the box. Easy to set up, Defender's user agent banning tool now includes built-in bot and script presets to help you quickly block malicious traffic. It does all the security work for you—no editing of the .htaccess file required.

### Google reCAPTCHA Integration

Add reCAPTCHA security to your login / registration pages, lost password forms, and post comments in a couple of steps to up security and help protect from fraud and abuse. Select reCAPTCHA type, language, location, and style to suit. As well as Google, Defender also supports the following reCAPTCHA types:

* BuddyPress reCAPTCHA
* WooCommerce reCAPTCHA

### Login Screen Masking

Defender makes it easy to move your login screen to a custom URL. Not only does login screen masking improve security, but it also lets you white label your login user experience and improves branding.

### Force Password Reset

Enhance site security by forcing all users with selected roles to reset their password at any time. Especially helpful if you suspect a possible data breach on your site.

### Security Headers

Protect your site against common attacks, such as: XSS, code injection, cross site scripting, and more. Enable the following security headers:

* X-Frame-Options
* X-XSS-Protection
* X-Content-Type-Options
* Strict Transport
* Referrer Policy
* Permissions-Policy

### 404 Limiter
Detect when bots are being used to scan your site for security vulnerabilities and shut them down. The 404 limiter lets you stop the scan by detecting when a bot keeps visiting pages that do not exist, which can also save you from a giant strain on your site's performance.

### Security Notifications and Reports
Defender runs surveillance and sends security notifications with information that matters. All activity and notifications are recorded in the activity log to let you see at a glance the website security actions that have been taken by the Defender security plugin.

### Reduce Security Setup Time With Saved Configs

Save your Defender security plugin configurations and reapply them to your other sites in just a few clicks. You can create and save an unlimited number of security configurations.

### Pwned Password Check

Entered passwords are checked against public database breach records to further boost security. If a password is identified as compromised, the user will be asked to change it.

### Custom IP Block/Allowlist

Create your IP block/allow list once, then apply and automatically sync it to all your other sites with just a single click. Save hours by not having to manually add IPs to each individual site. *Note: a [free WPMU DEV account] (https://wpmudev.com/register) is required to access this feature.

### What Do People Say About Defender?

★★★★★
"I found other pro security plugins a bit too fiddly for my taste...I'm delighted with Defender" - <a href="https://profiles.wordpress.org/keithadv">KeithADV</a>

★★★★★
"Thank you for bringing back a free and easy to use 2-Factor Authentication after Clef! Defender helps keep me aware of my site's security." - <a href="https://wordpress.org/support/users/awijasa/">awijasa</a>

★★★★★
"Defender's interface is very intuitive with warnings that are very helpful" - <a href="https://wpmudev.com/profile/djohns">djohns</a>

★★★★★
"Defender Recently blocked over 3000 attacks in one week without any noticeable impact on the website. WPMUDEV knocking it out of the park on this one." - <a href="https://wpmudev.com/profile/davidoswald/">David Oswald</a>

### Secure Websites, More Trust, Better Profit
If you're running a business website or eCommerce store, privacy, security, uptime and trust are essential.

The Defender security plugin is here to help you: it's a one of a kind WordPress security plugin that makes web security easy for anyone, for free!

* Malware scanner
* Google two-factor authentication (2FA)
* Web Authentication
* Firewall setup and configuration
* One-click site hardening and security tweaking
* WordPress core file scanning and repair
* Ongoing firewall security
* Google reCAPTCHA
* Security headers
* One-click security configs
* Login Screen Masking
* Pwned Password Check
* IP Blocklist manager and logging
* Geo IP blocking
* User agent banning
* Unlimited file scans
* Timed Lockout brute force login attack shield for login security
* 404 limiter for blocking vulnerability scans
* IP lockout notifications and security reports

All the above is free and will enhance WordPress security for you. If you need extra security for your WordPress site, [you should get a WPMU DEV Membership](https://wpmudev.com/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=defender-readme&utm_content=you_should_get_wpmudev_membership#trial).

Our Membership gives you access to Defender Pro - which security features include automated scanning, scheduled malware scans for Core, themes, plugins and other files, audit logs, firewall protection, Safe Repair, Blocklist monitoring - alongside Snapshot Pro cloud backups, the Hub with automated plugin, theme and core updates and safe-upgrade scans, all our premium WordPress plugins, 24/7 WordPress support and if your sites already been hacked our team of security experts will clean it up at no additional cost.

[It's an incredible deal, and you can find out more here](https://wpmudev.com/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=defender-readme&utm_content=and_you_can_find_out_more_here#trial).

== Frequently Asked Questions ==

= Why should I choose Defender over other security plugins? =

Defender is built to add all the best hardening and website security recommendations used by the pros without having to become a security expert. This means you get all the most effective and proven protection methods other services provide with fewer settings, one-click hardening and faster setup.

= Is installing Defender the only step I need to take for better WordPress security? =

Hackers and bot attacks are not the only security threats to your site. No matter what security plugin or service you use, always be prepared with a secure backup stored in a safe location away from your live site. Security does not protect from hosting outages, server errors and accidentally lost or damaged data. We recommend [Snapshot](https://wpmudev.com/project/snapshot/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=defender-readme&utm_content=snapshot#trial). Defender with scheduled managed backups is the best way to keep your site safe.

= Does Defender security protect against harmful bots? =

Yes! Defender's Firewall gives you robust site protection and security by allowing you to block bad bot IPs and use geographical IP blocking

= Can I use Defender with other security plugins? =

You can. Just make sure not to enable the same security features in the third-party plugin that you also have enabled in Defender, as this might cause conflicts, such as malware scanners, firewall, and login security features.

= Is Defender’s security compatible with WordPress Multisite? =

Yes! All of Defender's security features are fully compatible with a multisite installation. It can be network enabled and managed from the network admin.

=  Does Defender offer spam protection and security? =

Yes, Defender provides multiple layers of spam protection and security. A large percentage of Trackbacks and Pingbacks are spam, and Defender allows you to easily disable both to reduce spam and improve site security. Additionally, Defender includes the AntiBot Global Firewall, which blocks known malicious IPs and bots before they even reach your site, offering proactive protection against common attacks and spam bots.

= Will my site be protected from DDoS attacks and similar security threats? =

Yes. Defender's IP banning, IP lockout, and 404 detection security features can identify DDoS attacks and block bad IPs.

= I've locked myself out of my admin panel, what can I do? =

If you’re the administrator and you’ve been locked out due to multiple failed login attempts, Defender offers two options:

Option #1: Use the “Unlock Me” feature:

Click the Unlock Me button on the login page and enter your username or the email address linked to your site. You’ll receive an email with a secure link to unlock your account and regain access — no technical steps needed.

Option #2: Use the manual method (if email doesn’t work):

Add the following code to your theme’s functions.php file, located in the main directory of your active theme.
`
add_filter( 'ip_lockout_default_whitelist_ip', function ( $ips ) {
  $ip    = 'YOUR IP HERE';
  $ips[] = $ip;
  return $ips;
} );
`
Replace "YOUR IP HERE" with your actual IP address (you can use a tool like whatsmyip to find it.)

= Help! I was already hacked. What should I do? =

WPMU DEV's expert support can advise you on how to clean up your site if it's been hacked. Create a new thread in our [support forum](https://wordpress.org/support/plugin/defender-security/), or [Defender Pro](https://wpmudev.com/project/wp-defender/) gives you access to 24/7 live support.

= How can I report security issues or bugs? =

We take plugin security incredibly seriously; if you have a bug or vulnerability to report, you can do so through the Patchstack Vulnerability Disclosure Program. It's fast, easy, and you will be notified when the issue is fixed. [Report a vulnerability](https://patchstack.com/database/vdp/defender-security).

= I have another question, where's the best place to get help with security? =

Please open a new thread in Defender's [support forum](https://wordpress.org/support/plugin/defender-security/). Our support team is always happy to help!

== Screenshots ==

1. Malware scans and one-click website security hardening recommendations.
2. Layered security recommendations let you harden your site with a few clicks.
3. Enable AntiBot & Local Firewall for smart, layered defense against bots and brute-force attacks.
4. Keep your account safe with 2FA options including TOTP apps, backup codes, and secure fallback methods.
5. Use built-in password rules to ensure only secure, uncompromised passwords are used.
6. Never miss a threat—Defender emails you security updates on your schedule.

== Installation ==

1. Upload the `wp-defender` plugin to your `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Configure and manage using the `defender` menu item in the WordPress dashboard.
4. Done!

== Changelog ==

= 5.8.1 ( 2026-01-12 ) =

- Enhance: Miscellaneous improvements

= 5.8.0 ( 2025-12-24 ) =

- New: Detect suspicious code in JavaScript files during Malware Scanning
- Enhance: Prevent false lockouts when requests contain mixed Facebook/Twitterbot user agents
- Enhance: Update Axios and form-data package versions
- Enhance: Update malware signatures
- Enhance: Split Bulk checkboxes between tabs on Malware Scanning page
- Enhance: Display Disconnect Site button on Defender’s general settings screen
- Enhance: Improve plugin code style using PHPStan
- Enhance: Improve UI for background Malware Scanning
- Enhance: Restore reCAPTCHA class alias for backward compatibility
- Enhance: Add new audit logging events
- Enhance: Migrate notification events to the centralized Cron Manager
- Enhance: Migrate common plugin events to the centralized Cron Manager
- Fix: Update .htaccess rules for LiteSpeed servers
- Fix: Duplicate user agent records in robots.txt
- Fix: Extra space and hidden Google reCAPTCHA field shown on multisite registration page
- Fix: Duplicates of Ignored Scan issues
- Fix: Deprecation warnings from the thecodingmachine/safe package in PHP 8.4
- Fix: Quarantine activation link does not work in the free version
- Fix: Incorrect "Configure" button flow in the Firewall widget on the Dashboard
- Fix: UI improvements

= 5.7.2 ( 2025-12-15 ) =

- Enhance: Miscellaneous improvements

= 5.7.1 ( 2025-11-24 ) =

- Fix: Improve 404 detection flow

= 5.7.0 ( 2025-11-18 ) =

- New: Cloudflare Turnstile integration
- Enhance: Compatibility with WordPress 6.9
- Enhance: Redesigned CAPTCHA menu
- Enhance: Optimize database performance on multisite
- Enhance: Add additional widget IDs on Defender’s Dashboard page
- Enhance: Add new hooks to simplify Audit testing and Firewall logs deletion
- Enhance: Update minimum supported PHP version to 8.0
- Enhance: Disable New Scan button until the background scan is complete
- Enhance: Migrate Security Recommendations multisite events to the centralized Cron Manager system
- Enhance: Migrate Malware Scanning multisite events to the centralized Cron Manager system
- Enhance: Tracking improvements
- Fix: Masking URL displays a notice when using a slug already assigned to another page
- Fix: Defender not detecting some outdated plugins
- Fix: Recommended PHP version appears as NULL on WP Engine hosting
- Fix: Default Security Config name and description not saving properly
- Fix: UI improvements

= 5.6.2 ( 2025-11-20 ) =

- Enhance: Miscellaneous improvements

= 5.6.1 ( 2025-10-21 ) =

- Fix: Malicious Bot Detector blocking Facebook Sharing Debugger bot

= 5.6.0 ( 2025-10-07 ) =

- New: Malicious Bot Detector
- New: WooCommerce integration with Defender > Strong Password
- Enhance: Migrate Audit multisite events to the centralized Cron Manager system
- Enhance: Migrate Firewall multisite events to the centralized Cron Manager system
- Enhance: Improve plugin detection logic to exclude plugins not from wp.org
- Enhance: Remove AntiBot IP list after site disconnection
- Enhance: Add rel="nofollow" to Bot Trap URL
- Enhance: Hide Blocklist Checker and AntiBot Stats button when Whitelabel is enabled
- Enhance: Sync with the Custom IP Block/Allow list across different hosting memberships
- Enhance: Add parameter to WP-CLI Scan command for outdated and closed plugins
- Enhance: Add audit logging event to detect Hub SSO login
- Enhance: Improve plugin code style using PHPStan and ESLint rules
- Fix: Web Authentication improvements
- Fix: Security Recommendations > Security key value not saved
- Fix: Defender not adding noindex tag to secret link of Bot Trap
- Fix: Notification hints not displaying properly
- Fix: Issue on Firewall Logs page when logging in with an expired session using the default WordPress login modal
- Fix: Defender country blocklist not working for EU region and UK

[Changelog for previous versions](https://wpmudev.com/project/wp-defender/#view-changelog).

== Upgrade Notice ==

== About Us ==
WPMU DEV is a premium supplier of quality WordPress plugins and themes. For premium support with any WordPress-related issues you can join us here:
[https://wpmudev.com/](https://wpmudev.com/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=defender-readme&utm_content=wpmu_dev_link)

Don't forget to stay up to date on everything WordPress from the Internet's number one resource:
[WPMU DEV Blog](https://wpmudev.com/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=defender-readme&utm_content=wpmu_dev_blog_link)

Hey, one more thing... we hope you [enjoy our free offerings](http://profiles.wordpress.org/WPMUDEV/) as much as we've loved making them for you!
