=== Security Ninja – WordPress Security Plugin & Firewall ===
Contributors: lkoudal, cleverplugins, freemius
Donate link: https://wpsecurityninja.com/
Tags: security, malware, firewall, virus, login
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Requires at least: 4.7
Tested up to: 6.8.3
Stable tag: 5.261
Requires PHP: 7.4

Ultimate WordPress security plugin with malware scanning, firewall, and login protection. Keep your site safe from threats effortlessly.

== Description ==

Protect your WordPress website from hackers, malware, and security vulnerabilities with Security Ninja, a trusted WordPress security plugin since 2011. This all-in-one security solution safeguards your site with 50+ security tests, malware scanning, a firewall, brute force attack protection, and real-time vulnerability detection.

Security Ninja Plugin proactively identifies security risks, ensuring your WordPress website stays secure without slowing it down. With features like automated security scans, login protection, IP blocking, and two-factor authentication (2FA), it provides comprehensive website protection against cyber threats.

Whether you're a beginner or an advanced user, Security Ninja is designed for effortless WordPress security management, keeping your site safe while you focus on growing your business. Install today and take control of your website's security!

This plugin can be downloaded for free without any paid subscription from <a href="https://wordpress.org/plugins/security-ninja/">the official WordPress repository</a>.

**Why Choose Security Ninja? – The Ultimate WordPress Security Plugin**

- **Comprehensive Security Testing** – Run 50+ WordPress security tests to detect vulnerabilities before hackers exploit them.
- **Enhanced Vulnerability Scanner** – Stay ahead of emerging threats with proactive alerts for vulnerabilities.
- **Core Scanner** - Find and remove modified and unwanted files in your WordPress core files.
- **Advanced Malware Scanner (PRO)** – Identify and remove malicious code, hidden threats, and suspicious files instantly.
- **Powerful Firewall Protection (PRO)** – Block brute-force attacks, unauthorized logins, and suspicious IPs with real-time security.
- **Secure Login & 2FA (PRO)** – Strengthen your WordPress login page with Two-Factor Authentication (2FA) and login attempt limits.
- **Cloud-Based Threat Intelligence (PRO)** – Stay ahead of cybercriminals with real-time updates on the latest security threats.
- **One-Click Security Fixes (PRO)** – Fix security issues instantly with an easy-to-use, beginner-friendly dashboard.
- **Automated Security Scans & Reports (PRO)** – Schedule scans and get detailed reports sent to your inbox.
- **Activity Log & User Tracking (PRO)** – Track all user actions on your WordPress website with a detailed activity log and receive alerts for suspicious activity.




**Key Features of Security Ninja – The Ultimate WordPress Security Plugin**

Security Ninja is a powerful WordPress security plugin designed to protect your website from hackers, malware, brute-force attacks, and security vulnerabilities. With 50+ security tests, real-time malware scanning, a firewall, and login protection, Security Ninja keeps your WordPress site secure without slowing it down.

**Comprehensive WordPress Security Testing**

Security Ninja performs 50+ advanced security tests to identify vulnerabilities before hackers exploit them. This includes:

- **Brute-force protection** – Blocks unauthorized login attempts to prevent forced entry.
- **File integrity monitoring** – Detects unauthorized changes to WordPress core files, themes, and plugins.
- **Database security checks** – Identifies weak database permissions and potential SQL injection threats.
- **User role audits** – Ensures no unauthorized administrator accounts exist.
- **Security misconfiguration scans** – Identifies and fixes weak settings that could compromise security.

**Enhanced Vulnerability Scanner**

- **Stay Ahead of Threats** – Our vulnerability scanner proactively alerts you to known vulnerabilities, allowing you to address potential threats before they exploit your website.
- **Comprehensive Protection** – Security Ninja not only checks and warns for common issues but also checks for known vulnerabilities in plugins and themes.
- **Peace of Mind** – Knowing your site is monitored for the latest vulnerabilities means you can focus on what matters most, growing your business and creating content, worry-free.


**Core Scanner – Comprehensive Protection for Your WordPress Installation**

The Core Scanner module adds a critical layer of security by ensuring your WordPress installation remains untampered and free of unauthorized files.

- **Full Core File Integrity Check**: Every file in your core WordPress folders is scanned to ensure it hasn't been modified or compromised.
- **Detection of Unknown Files**: The scanner flags any extra or unknown files in your core WordPress directories, alerting you to potential threats.
- **Built-in File Viewer**: Review flagged files directly within your WordPress dashboard using the integrated file viewer for a clear and easy inspection.
- **Restore Core Files**: If a core WordPress file has been altered, you can quickly restore it with a single click, ensuring your site is running the official version.
- **Easy File Management**: For unknown or suspicious files, you have the option to delete them right from the interface, keeping your WordPress installation clean and secure.


**Advanced Malware Scanner – Detect & Remove Malware Instantly (PRO)**

Security Ninja includes a high-performance malware scanner that automatically checks your WordPress core, plugins and themes for:

- **Malicious scripts and backdoors** – Identifies hidden malware and harmful injections.
- **Trojan and virus detection** – Scans for suspicious PHP and JavaScript entries.
- **One-click malware removal** – Instantly quarantine and delete infected files.

**WordPress Firewall & Real-Time Threat Protection (PRO)**

The Web Application Firewall (WAF) blocks hacker attempts, bot attacks, and brute-force login attempts before they can damage your site.

- **Real-time protection** – Prevents malicious traffic and automated hacking attempts.
- **IP & Country Blocking** – Restrict access from high-risk countries and blacklisted IPs.
- **Cloud-Based Threat Intelligence** – Updated with the latest security threats.

**Login Security & Two-Factor Authentication (2FA) (PRO)**

Your WordPress login page is a primary target for hackers. Security Ninja enhances login security with:

- **Two-Factor Authentication (2FA)** – Requires additional verification for safer logins.
- **Brute-force attack protection** – Limits failed login attempts to block unauthorized access.
- **Rename login** - Getting a lot of requests to your login form? Hide it for spammers.

**One-Click Security Fixes & WordPress Hardening (PRO)**

Manually fixing security issues is time-consuming. Security Ninja provides one-click hardening to:

- **Disable XML-RPC** – Blocks common DDoS attacks and brute-force exploits.
- **Restrict file editing** – Prevents unauthorized theme and plugin modifications.
- **Hide PHP error messages** – Stops hackers from exploiting sensitive error details.

And many more fixes to harden your WordPress security!

**Activity Log & User Tracking (PRO)**

Keep track of all actions on your WordPress website with a detailed activity log:

- Monitor failed login attempts, plugin activations, file changes, and user actions.
- Receive email alerts whenever suspicious activity is detected.
- Export security logs for audits and compliance reports.
- The plugin includes webhook functionality so you can integrate with any other 3rd party service, maybe send updates in the company Slack channel when a hack attempt was thwarted?

**Automated Security Scans & Reports (PRO)**

Security Ninja performs scheduled security scans and sends reports directly to your inbox.

- Set up daily, weekly, or monthly security scans.
- Receive email alerts about vulnerabilities and malware infections.
- Analyze detailed reports to keep your website secure.

**Block Spam & Malicious Bots Instantly (PRO)**

Hackers and spammers use bots to exploit WordPress websites. Security Ninja prevents:

- **Fake registrations and spam comments** – Stops bots from even getting to your site.
- **Malicious bot attacks** – Blocks scripts attempting to hack your site.
- **Unwanted traffic** – Reduces server load by preventing unnecessary bot access.

---

**Join thousands of satisfied users who trust Security Ninja to keep their websites safe. Start protecting your online presence today and help yourself to peace of mind.**

**Why Security Ninja is Best WordPress Security Plugin**

Security Ninja is the best WordPress security plugin because it provides a comprehensive, lightweight, and easy-to-use solution to protect your website from hackers, malware, and vulnerabilities. With 50+ security tests, an advanced malware scanner, a firewall, and two-factor authentication (2FA), it ensures complete website protection without slowing down performance.

Unlike bloated security plugins, Security Ninja is optimized for speed and efficiency. It offers one-click security fixes, automated scans, real-time threat detection, and login protection, making it ideal for beginners and advanced users alike. Trusted since 2011, it keeps thousands of websites secure while offering proactive protection against cyber threats.

===Extensions===
* MainWP - The MainWP Dashboard allows administrators to manage many WordPress websites from a central location.

Install the **FREE <a href="https://wordpress.org/plugins/security-ninja-for-mainwp/" target="_blank">Security Ninja for MainWP Extension</a>** to get an overview of all websites you have installed Security Ninja on!

https://wordpress.org/plugins/security-ninja-for-mainwp/


===Security Tests for your website===
# Security Ninja - Your WordPress Guardian

## Key Features

- **Immediate Vulnerability Alerts**: Get instant notifications about vulnerabilities to keep your website safe and secure.

- **Comprehensive One-click Security Audit**: With just one click, perform over 50+ detailed security checks that scrutinize every corner of your site for security vulnerabilities and performance issues.

- **You're in Command**: Security Ninja respects your autonomy, providing insights and recommendations without making unsolicited changes to your site.

- **Holistic Security Evaluation**: Comprehensive checks on everything from the WordPress core, plugins, and themes to ensure they are up-to-date and secure.

- **Proactive Defense Strategies**: Equip yourself with the tools and knowledge to prevent attacks before they happen, safeguarding your site from potential threats.

- **Optimization Beyond Security**: Improve your site's performance with database optimization tips, ensuring a seamless experience for your users.

- **Knowledge**: Each test comes with an easy-to-understand explanation, documentation, and actionable steps to fix identified issues.

- **Customized Security Insights**: Tailored security assessments to check critical updates and configurations specific to your WordPress setup for a personalized protection strategy.

- **Future-Proof Your Site**: Stay ahead with tests that include the latest WordPress features and best practices for site security.

- **Prevent Unauthorized Access**: Strengthen your defenses with checks designed to prevent weak passwords and unauthorized file access.

- **Secure Configuration Checks**: Ensure your website is configured according to security best practices, from file permissions to security headers, for comprehensive protection against threats.

Enhance your website's security, performance, and user experience with Security Ninja - your trusted partner in WordPress protection.


> **Security Ninja Pro** has extra features: Firewall, Block Suspicious Page Requests, Country Blocking, Core Scanner, Malware Scanner, Auto Fixer for some of the tests, Events Logger & Scheduled Scans.

An all-in-one security solution for any site. With premium support and continuous updates Security Ninja **Pro** is a perfect tool to keep your site safe. <a href="https://wpsecurityninja.com/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=see-what-pro-offers">See what the PRO version offers</a>

Automatically block **600+ million bad IPs** with one click! <a href="https://wpsecurityninja.com/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=cloud-firewall">Security Ninja Pro Firewall</a> will help you stay one step ahead of bad guys by using the collective know-how of millions of attacked sites, and ban bad guys before they even open your site.

> Read more about Pro features on the <a href="https://wpsecurityninja.com/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=readmoreaboutpro">Security Ninja website</a>

**What others say about the plugin**

* <a href="https://wpmayor.com/security-ninja-review-wordpress-security-plugin/">WP Mayor: "Easy-to-Use WordPress Security Plugin"</a>
* <a href="https://wplift.com/security-ninja-review">WPLift</a>
* <a href="https://www.wpexplorer.com/wordpress-security-can-security-ninja-keep-your-site-safe/">WPExplorer</a>
* <a href="https://wploop.com/security-ninja-review/">WP Loop</a>
* <a href="https://www.bitcatcha.com/blog/security-ninja-plugin-review/">Bitcatcha.com</a>
* <a href="https://www.webhostingsecretrevealed.net/blog/wordpress-blog/10-actionable-wordpress-security-tips/">WebHostingSecretRevealed</a>
* <a href="https://www.ravisinghblog.in/wp-security-ninja-review/">Ravi Singh</a>
* <a href="https://tutorials7.com/security-ninja-review.html">Tutorials 7</a>
* <a href="https://www.onlinedecoded.com/security-ninja-review/">onlinedecoded.com</a>

**Tests**
* The tests include:
  * brute-force attack on user accounts to test password strength
  * numerous installation parameters tests
  * file permissions
  * version hiding
  * 0-day exploits tests
  * debug and auto-update modes tests
  * database configuration tests
  * Apache and PHP related tests
  * WP options tests


* Complete list of tests:
  * Check if Application Passwords feature is enabled (new to WP 5.6)
  * Check if WordPress core is up to date
  * Check if automatic WordPress core updates are enabled
  * Check if plugins are up to date
  * Check if there are deactivated plugins
  * Check if active plugins have been updated in the last 12 months
  * Check if active plugins are compatible with your version of WP
  * Check if themes are up to date
  * Check if there are any deactivated themes
  * Check if full WordPress version info is revealed in page's meta data
  * Check if REST API links are displayed in page's meta data
  * Check the PHP version is up to date
  * Check the MySQL version
  * Check if server response headers contain detailed PHP version info
  * Check if expose_php PHP directive is turned off
  * Check if user with username "admin" and administrator privileges exists
  * Check if "anyone can register" option is enabled
  * Check user's password strength with a brute-force attack
  * Check for display of unnecessary information on failed login attempts
  * Check if database table prefix is the default one
  * Check if security keys and salts have proper values
  * Check the age of security keys and salts
  * Test the strength of WordPress database password
  * Check if general debug mode is enabled
  * Check if the debug.log file exists
  * Check if database debug mode is enabled
  * Check if JavaScript debug mode is enabled
  * Check if display_errors PHP directive is turned off
  * Check if WordPress installation address is the same as the site address
  * Check if <i>wp-config.php</i> file has the right permissions (chmod) set
  * Check if register_globals PHP directive is turned off
  * Check if PHP safe mode is disabled
  * Check if allow_url_include PHP directive is turned off
  * Check if plugins/themes file editor is enabled
  * Check if uploads folder is browsable by browsers
  * Test if user with ID 1 and administrator role exists
  * Check if Windows Live Writer link is present in pages' header data
  * Check if <i>wp-config.php</i> is present on the default location
  * Check if MySQL server is connectable from outside with the WP user
  * Check if EditURI link is present in pages' header data
  * Check if TimThumb script is used in the active theme
  * Check if the server is vulnerable to the Shellshock bug #6271
  * Check if the server is vulnerable to the Shellshock bug #7169
  * Check if admin interface is delivered via SSL
  * Check if MySQL account used by WordPress has too many permissions
  * Test if a list of usernames can be fetched by looping through user IDs on http://siteurl.com/?author={ID} (also called username enumeration)
  * Check if server response headers contain Strict-Transport-Security
  * Check if server response headers contain X-Frame-Options
  * Check if server response headers contain X-Content-Type-Options
  * Check if server response headers contain Content-Security-Policy
  * Check if server response headers contain Strict-Transport-Security
  * Check if server response headers contain Referrer-Policy
  * Check if server response headers contain Feature-Policy
  * Check for unwanted files in your root folder you should remove

**License info**

* <a href="https://github.com/carhartl/jquery-cookie">jQuery Cookie Plugin, Copyright 2013 Klaus Hartl</a>

* The vulnerability scanner uses data from the <a href="https://nvd.nist.gov/">National Vulnerability Database - NVD</a>

* This product includes IP2Location LITE data available from <a href="https://lite.ip2location.com">https://lite.ip2location.com</a>.

* This plugin uses the <a href="https://github.com/collizo4sky/persist-admin-notices-dismissal">Persist Admin notice Dismissals</a> by Collins Agbonghama @collizo4sky


= How can I report security bugs? =

You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. [Report a security vulnerability.](https://patchstack.com/database/vdp/security-ninja)


== Installation ==

= Installing from WordPress =

1. Open WordPress admin, go to Plugins, click Add New
2. Enter "Security Ninja" in search and hit Enter
3. Plugin will show up as the first on the list, click "Install Now"
4. Activate & go to Tools - Security Ninja to make your site more secure

= Installing Manually =

1. Download the plugin.
2. Unzip it and upload to _wp-content/plugin/_
3. Open WordPress admin - Plugins and click "Activate" next to the plugin
4. Activate & go to Security Ninja to make your site more secure

== Frequently Asked Questions ==

= Who is this plugin for? =
Security Ninja is perfect for anyone looking to bolster their site's defenses against hackers and ensure robust security.

= Will this plugin slow down my site? =
No significant slowdown occurs. You might notice a brief slow down during scanning, lasting less than a minute.

= Will it work with my theme? =
Yes, Security Ninja is designed to be compatible with all themes, ensuring wide-ranging applicability.

= What changes will Security Ninja make to my site? =
Security Ninja performs diagnostics and offers recommendations without making any direct changes to your site.

= How safe is this plugin? =
Absolutely safe. It functions solely as a diagnostic tool, providing insights without altering your site.

= Is using Security Ninja legal? =
Yes, it's completely legal for your own site. It's designed to run tests on the site where it's installed, aiding in your site's security enhancement.

= What if I encounter issues with the plugin? =
While we strive for universal compatibility, if you face any issues, our support team is ready to assist. Visit our [support forum](https://wordpress.org/support/plugin/security-ninja) to open a new thread, and we'll help you as soon as possible.


== Screenshots ==

1. Fast & easy to understand interface.
2. Security Ninja test results are simple and easy to read.
3. Vulnerable plugins list with details and recommendations - prevent known exploits in plugins.
4. Core scanner

== Changelog ==

= 5.261 =
* 2025-11-17
* Fixed: 2FA - Changed key name format from "site_url (username):email" to "site_url:username" -  Thank you Davina.
* Fixed: Compatibility warning with WordPress 6.7 regarding translation loading timing
* Fixed: Server security restriction warning when checking wp-config.php file location
* Fixed: Fixed critical bug where database prefix changer added an extra underscore when updating wp-config.php, causing WordPress to look for non-existent tables with double underscores (e.g., wp_12345__posts instead of wp_12345_posts). Thank you Tchai.
* Fixed: Database prefix changer to properly update option names and meta keys when changing from custom prefixes (not just "wp_").
* IMPROVED: Database prefix changer now works with any prefix, not just the default "wp_". Can now rename tables when changing from one custom prefix to another. All plugin tables are automatically included in the renaming process.

= 5.260 =
* 2025-11-12
* NEW: Failed login email warnings - administrators receive email notifications when someone attempts to log in with their username and fails. Can be enabled in Login Form Protection settings.
* NEW: Admin IPs are automatically whitelisted on plugin activation and successful admin login to prevent administrators from being blocked. Thank you Val.
* FIX: Fixed country blocking to respect "only block backend" setting when enabled. Thank you Guru for the tip.
* IMPROVED: Secret access URL processing has been moved up in the request cycle to make sure IP whitelisting happens before any ban checks, so blocked visitors should be able to get back on the site more reliably.
* IMPROVED: wp-config.php backups are stored in encrypted format (AES-256-CBC) to ensure data security. Each backup uses a unique encryption key and initialization vector. This was introduced in a previous release, but was not added to the changelog.
* Update 3rd party libraries - Freemius SDK 2.13.0 among others.

= 5.259 =
* 2025-11-07
* IMPROVED: Made the dashboard widget visible when white label mode is enabled. Previously the widget was hidden instead. Thank you for the suggestion, Dmitry.
* IMPROVED: Added count-based limit (5000 entries) to visitor log pruning to prevent database bloat on high-traffic sites.
* IMPROVED: Removed deprecated X-XSS-Protection header from REST API - modern browsers ignore this header and Content-Security-Policy is the recommended replacement. Thank you Dmitry for the suggestions.
* IMPROVED: More information on CSP in our knowledgebase. 
* FIX: Fixed typo in Permissions-Policy description (explitly → explicitly).
* FIX: Updated Permissions-Policy documentation link from Feature-Policy to Permissions-Policy URL.
* FIX: Corrected Nginx example in Content-Security-Policy test descriptions (was showing X-Frame-Options instead of CSP).
* Preparing for plugin rewrite -> improving the free version and streamlining the premium and free feature set.

= 5.258 =
* 2025-11-06
* NEW: Enhanced username enumeration protection - Now prevents username discovery via REST API /wp-json/wp/v2/users endpoint and oEmbed API, in addition to existing ?author=N scan protection. Thanks Allen. 

= 5.257 =
* 2025-10-22
* Removed duplicate 2FA login requests to prevent error flashes. Thanks to Eric for spotting this.
* Added try-catch to prevent problems with corrupted IP location database, thank you Wan.

= 5.256 =
* 2025-10-09
* Fix for recommendation engine "wp-config.php not found in the wordpress root directory" - now properly checks for when the config file has been moved up on level. Thank you Eric.
* Fix - 2FA email, user reported emails were sent twice with two different codes. Thank you Eric.
* Improved 2FA setup page stability and performance across different WordPress configurations.
* 2FA - naming of the accounts are now a little more intuitive. Thank you Davina.


= 5.255 =
* NEW: Added XML-RPC protection feature. This update enhances your site's security by allowing you to easily enable or disable XML-RPC access.
* Improved: Malware signatures tweaked and improved, thank you users for suggestions.

= 5.254 =
* NEW: Add secret key display and copy functionality to 2FA module in frontend and backend. Allowing users to easier add the key to their system.
* FIX: Installation issues that pop up occasionally has been fixed.
* FIX: Timezone on Overview page was incorrect, thank you for spotting Ivar.
* FIX: Resolved JavaScript conflicts that prevented 2FA functionality from working with ARMember and other plugins
* FIX: 2FA QR code/key generation now works reliably across all site configurations, even if other scripts have errors. "Skip for now" link, "Generate new QR code" button, code input validation, and temporary secret usage during setup all function correctly.
* FIX: 2FA setup UI and logic are now robust—QR code generation.
* IMPROVED: Enhanced 2FA JavaScript with robust error handling and DOM ready protection
* IMPROVED: Added inline JavaScript handlers as fallback to ensure 2FA works even when external scripts fail
* IMPROVED: Better error messages and user feedback during 2FA setup process

= 5.253 =
* NEW: Setting up 2FA for users in admin pages
* Fix for coupon protection in WooCommerce modern block cart and checkout page - Thank you Priit.

= 5.252 =
* Fixes for REST API warnings.
* Updated internal libraries (PHP enums, WordPress SDK, and PHP_CodeSniffer tooling) to latest patch versions for improved stability, coding standards checks, and compatibility. No breaking changes.

= 5.251 = 
* Fix: Removed extra whitespace in "import/export".
* Fix: Improved "Fixes" features proper loading when doing import/export.

= 5.250 =
* Remove translated messages for errors logging in, creating a loop trying to present translated messages using WP's translation engine.
* Fix: Fixed database prefix renaming to properly handle option names containing embedded prefixes. Thank you Chris!
* Enhanced: Improved custom login URL security with proper access control and error handling

...

Entire changelog can be seen here: <a href="https://wpsecurityninja.com/changelog/" target="_blank">changelog</a>

== Upgrade Notice ==
5.258
Recommended update.