Title: Error: cannot find your wp-config.php file
Last modified: September 6, 2022

---

# Error: cannot find your wp-config.php file

 *  Resolved [aschlemmer](https://wordpress.org/support/users/aschlemmer/)
 * (@aschlemmer)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-cannot-find-your-wp-config-php-file/)
 * Hello,
 * your suggested wp-check.php is telling me:
 *     ```
       NinjaFirewall (WP edition) troubleshooter
       HTTP server 	: 	Apache
       PHP version 	: 	7.4.30
       PHP SAPI 	: 	FPM-FCGI
   
       auto_prepend_file 	: 	none
       wp-config.php 	: 	Error: cannot find your wp-config.php file
       ```
   
 * This may happen because the home of wp-config.php is not the common wp-admin 
   folder, this installation renamed to to something like ‘hgnv7u67nn’ – how to 
   tell NinjaFirewall where wp-config.php resides?
 * Thanks,
    Achim

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-cannot-find-your-wp-config-php-file/#post-15985781)
 * You can give the full path (absolute path) to the wp-config.php by adding it 
   to the [.htninja configuration file](https://blog.nintechnet.com/ninjafirewall-wp-edition-the-htninja-configuration-file/):
 * 1. Create a file and name it `.htninja`.
 * 2. Add this code:
 *     ```
       <?php
       /*
        +===========================================================================================+
        | NinjaFirewall optional configuration file                                                 |
        |                                                                                           |
        | See: https://blog.nintechnet.com/ninjafirewall-wp-edition-the-htninja-configuration-file/ |
        +===========================================================================================+
       */
   
       // Absolute path to the wp-config.php
       $wp_config = '/foo/bar/wp-config.php';
       ```
   
 * 3. Upload the file to the WordPress root folder.
 * 4. Log in to WordPress, go to NinjaFirewall > Dashboard and check if the firewall
   detected and loaded the .htninja.
 *  Thread Starter [aschlemmer](https://wordpress.org/support/users/aschlemmer/)
 * (@aschlemmer)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-cannot-find-your-wp-config-php-file/#post-15991719)
 * simple, efficient – now working
    thank you!
    -  This reply was modified 3 years, 9 months ago by [aschlemmer](https://wordpress.org/support/users/aschlemmer/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error: cannot find your wp-config.php file’ is closed to new replies.

 * ![](https://ps.w.org/ninjafirewall/assets/icon-256x256.png?rev=976137)
 * [NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall](https://wordpress.org/plugins/ninjafirewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninjafirewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninjafirewall/)
 * [Active Topics](https://wordpress.org/support/plugin/ninjafirewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninjafirewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninjafirewall/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [aschlemmer](https://wordpress.org/support/users/aschlemmer/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/error-cannot-find-your-wp-config-php-file/#post-15991719)
 * Status: resolved