• Resolved stimartnet

    (@stimartnet)


    Hi, for security reasons I’ve moved wp-config.php one up level from web root to “/var/xxx/yyy/private/wp.php”;
    I’ve created a new wp-config.php in the web root, like this:

    include_once(‘/var/xxx/yyy/private/wp.php’);

    Now Ninjafirewall shows me following message: “Cannot retrieve WordPress database credentials”.
    Can you help me?
    Thanks in advance.
    Marco

    • This topic was modified 1 year, 3 months ago by stimartnet.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    The firewall can detect if the file is located in the parent directory, but it must be named “wp-config.php”. As you renamed it, you need to use the .htninja configuration file to tell the firewall where it is. Here’s the code to add to the file, based on your example:

    <?php
    // To tell NinjaFirewall where you moved your WP config file,
    // use the '$wp_config' variable :
    $wp_config = '/var/xxx/yyy/private/wp.php';
    
    Thread Starter stimartnet

    (@stimartnet)

    Thank you so much! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Message error if wp-config moved one up level’ is closed to new replies.