The Keys to the Kingdom
Your wp-config.php file contains your database credentials, security salts, and crucial configuration settings. If an attacker gains access to this file, they own your site.
How to Protect It
- Move it up one level: Did you know you can move your
wp-config.phpfile one directory above your WordPress installation (e.g., outsidepublic_html)? WordPress will automatically look for it there, but web browsers cannot access it. - Set Strict Permissions: The file permissions should be set to
400or440. This means the file can be read by the server, but cannot be modified. - Deny Access via .htaccess: Add rules to your
.htaccessfile to explicitly block all web requests towp-config.php.
Implementing these simple steps drastically reduces your attack surface.
Need immediate help?
If your site is currently hacked or showing warnings, our incident response team can help right now.
Upgrade to Nexura Pro
Get enterprise-grade protection. Block zero-day exploits, advanced malware, and brute-force attacks instantly.
LIMITED TIME LAUNCH OFFER
