i moved wp-config.php outside of public html and this broke my website
I moved it back and the website started working again. I tried moving wp-config to secure my wordpress site
here is what i did:
- created another file
config.php
- downloaded
wp-config
and copied all the code in it toconfig.php
- cleaned all the code in
wp-config.php
and wrote this:
?php
include('domains/mydomain.com/conf/config.php');
i wrote my real domain name instead of mydomain.com
uploaded
config.php
to /domains/mydomain.com/confuploaded
wp-config.php
to /domains/mydomain.com/public_html
before moving wp-config.php
, i modified .htaccess to forbid public access to wp-config.php
what did i do wrong while moving wp-config.php ? i also tried uploading config.php
without conf folder, to /domains/mydomain.com/ but the result is the same.
is .htaccess method enough or i still need to move wp-config.php outside of the public folder?