security for wp-config-php

Hi all,

I read somewhere to put my wp-config.php in a directory one level under my /public_html, because then you can not try to access it any more.

Is this the right way to do it and has this any consequent for my marketpress or any future updates?

Ella

  • aecnu
    • WP Unicorn

    Greetings Ella,

    Thank you for this great question and a significant item to bring up.

    Is this the right way to do it and has this any consequent for my marketpress or any future updates?

    This is definitely the wrong thing to do.

    The right thing to do is add the following code as the first lines to your htaccess file:

    <files wp-config.php>
    order allow,deny
    deny from all
    </files>

    That will take care of it without negatively impacting your Word Press installation.

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.