Title: Cannot retrieve WordPress database credentials.
Last modified: November 12, 2020

---

# Cannot retrieve WordPress database credentials.

 *  Resolved [Olivia](https://wordpress.org/support/users/metadigitalnz/)
 * (@metadigitalnz)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cannot-retrieve-wordpress-database-credentials-2/)
 * Hi, I’ve set up NinjaFirewall on many sites, but two are giving me the following
   error
 *     ```
       NinjaFirewall fatal error: Cannot retrieve WordPress database credentials. Review your installation, your site is not protected.
       ```
   
 * I have checked the passwords for the database and made sure there were no slashes
   or anything in the password, but I still cannot set up the plugin.

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

 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cannot-retrieve-wordpress-database-credentials-2/#post-13653226)
 * Can you run this script: [https://nintechnet.com/share/wp-db.txt](https://nintechnet.com/share/wp-db.txt)
   
   1. Rename it to “wp-db.php”. 2. Upload it into your WordPress root folder. 3.
   Go to `https://YOUR WEBSITE/wp-db.php` 4. Delete it afterwards.
 * It will help to locate the error.
 *  Thread Starter [Olivia](https://wordpress.org/support/users/metadigitalnz/)
 * (@metadigitalnz)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/cannot-retrieve-wordpress-database-credentials-2/#post-13665497)
 * Thanks, the error I got was
 * – cannot read table_prefix
 * How do I fix this?
 *  Plugin Author [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * (@nintechnet)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/cannot-retrieve-wordpress-database-credentials-2/#post-13667465)
 * Download your wp-config.php file and search for the `$table_prefix = 'xxxx_';`
   line, where `xxxx_` is the database prefix. Is there any special characters in
   the prefix? Or multiple similar `$table_prefix` lines?

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

The topic ‘Cannot retrieve WordPress database credentials.’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [nintechnet](https://wordpress.org/support/users/nintechnet/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/cannot-retrieve-wordpress-database-credentials-2/#post-13667465)
 * Status: resolved