Bug: Database Information Read from wp-config.php

The database information that show’s within Local is actually a mirror of what in wp-config.php. The issue is that if you type something wrong in the wp-config.php file, or if you start with a wp-config-dist.php file and rename it and re-use it, that bad information gets sucked back into Local. Then when you have DB connection problems, it’s not clear as to what the issue is as what’s in your config file matches what’s in Local.

To Reproduce:

  1. Create a new site in local.
  2. Open wp-config.php and change the DB_USER to something else.
  3. Look in Local (might have to switch between tabs/sites for it to refresh)
  4. You’ll see that Local adopts the value from wp-config.php even though it’s incorrect.
    https://cloudup.com/c8ilTo3Bpju

Expected Result: Local always shows the correct information.

1 Like

Hi @TwisterMc,

Good point! I’ll make a note to show the defaults if wp-config.php has differing values.

1 Like