Protect wp-config.php with .htaccess – WordPress Code Snippets

[ad_1]

To tighten security of your WordPress blog/website, you should prevent direct access to wp-config.php file. You can prevent this with htaccess. Adding this simple code to your .htaccess file will prevent unauthorized access to your wp-config.php file.

# Disable direct access to wp-config.php
<files wp-config.php>
  order allow,deny
  deny from all
</files>

[ad_2]

PROMEX · YOUR ACCOUNT

Login / Register

Use your WhatsApp number. We’ll send you a code to sign in securely.

Your code expires in 5 minutes. Never share it with anyone.