WordPress.org

Support

Support » How-To and Troubleshooting » Encrypt DB_PASSWORD in wp-config.php

Encrypt DB_PASSWORD in wp-config.php

  • I had to change my database connection in WordPress today. Everything is working fine but I had to change the DB password in wp-config.php with a new password. My concern is that the previous password appeared to be encrypted in the wp-config.php.

    How do I get this encrypted again? I reran setup-config.php but this still left the password not encrypted. The old secret keys are in the wp-config.php file. Not sure if this is related.

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘mypassword’);

Viewing 2 replies - 1 through 2 (of 2 total)
  • It probably wasn’t encrypted, just a good password, long with lots of random characters. The only way someone’s going to gain access to it is if they have access to your source code, in which case you’re in a lot bigger trouble than them just messing with your database.

    I went back to my previous backup of wp-config.php and the password was as follows in the file. This is not the password I setup in cPanel for the sql database user for the WordPress database so I am still puzzled.

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘e3wuU99nuq3TW5Gc’);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Encrypt DB_PASSWORD in wp-config.php’ is closed to new replies.