• I installed wordpress about a year ago, and I don’t know if its something I did when setting it up so that my DB password isn’t in plain text, but I searched and can’t find anything about this. I have a situation where it would be prudent to change my DB_PASSWORD, but it’s not set in wp_config.php, and setting it there to my new password still results in a database connection error and wordpress will not load.

    So my question is, where could it possibly be set? Is it encrypted somewhere else? I tried from web root:

    grep -R DB_PASSWORD *

    and none of the results have my old password.

    Thanks for any help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Yui

    (@fierevere)

    永子

    wp-config.php can be 1 level upper than your webroot.

    By default DB_PASSWORD is always defined in wp-config.php
    but in some cases can be moved (manually) into external file, which can be
    require_once() included from wp-config.php

    Thread Starter volto

    (@volto)

    Thanks but I searched and it’s not any level above webroot, and there’s no require_once() to any file containing my password. Any other ideas?

    Moderator Yui

    (@fierevere)

    永子

    MySQL 8 and MariaDB 10.4 can use password-less authentification via Unix socket.
    no other ideas, otherwise your password should be somewhere among other database directives. Have you found them? DB_NAME DB_USER DB_HOST

    Thread Starter volto

    (@volto)

    Nope, didn’t find them anywhere, very strange that it works. Also strange that when I changed the database password it would no longer connect, if it’s not defined anywhere. So I know its not a socket connection. I found a security workaround by just disallowing remote IP addresses to my phpmyadmin directory from the apache config.

    Thanks for your ideas though.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need to change DB_PASSWORD but it’s not in wp_config.php or anywhere’ is closed to new replies.