# Able to connect to database through DevKinsta but when I try tun run site can't find database

**URL:** https://community.kinsta.com/t/able-to-connect-to-database-through-devkinsta-but-when-i-try-tun-run-site-cant-find-database/916
**Category:** Application Support
**Created:** [August 10, 2021, 8:41pm UTC](https://community.kinsta.com/t/able-to-connect-to-database-through-devkinsta-but-when-i-try-tun-run-site-cant-find-database/916 "2021-08-10T20:41:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![timo](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@timo](https://community.kinsta.com/u/timo)
#### Post date: [August 10, 2021, 8:41pm UTC](https://community.kinsta.com/t/able-to-connect-to-database-through-devkinsta-but-when-i-try-tun-run-site-cant-find-database/916/1 "2021-08-10T20:41:15Z")

</div>

I’m trying to set up all of our sites locally. The first one set up without a hitch. On the second one after pulling down from Kinsta I got a white screen when trying to run the site through DevKinsta. After checking the logs I found that several files were missing for some reason. I downloaded those files and no longer get the white screen or the site error messages but I get the “Error establishing a database connection” message. The database is there and I’m able to access it through the DevKinsta interface. Can you point me in the right direction to troubleshoot this?

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [August 10, 2021, 9:50pm UTC](https://community.kinsta.com/t/able-to-connect-to-database-through-devkinsta-but-when-i-try-tun-run-site-cant-find-database/916/2 "2021-08-10T21:50:00Z")

</div>

Welcome to DevKisnta @timo ! I’m happy to help!  
I think it may be best to completely re-download the site from within DevKinsta and erase the current one. There may be additional missing files missing not being caught. The “Error establishing a database connection” message indicates that perhaps the wp-config.php is misconfigured to use DevKinsta. If reloading the site still doesn’t work, double check the wp-config.php file matches the database credentials shown from the [Database section of DevKinsta](https://kinsta.com/knowledgebase/devkinsta/database-manager/#enter-through-host-machine).

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [October 29, 2021, 2:29pm UTC](https://community.kinsta.com/t/able-to-connect-to-database-through-devkinsta-but-when-i-try-tun-run-site-cant-find-database/916/3 "2021-10-29T14:29:24Z")

</div>

We haven’t heard back from you on this topic in a while. However, if you do need further assistance you can simply start a new forum thread. Thank you again for using DevKinsta. Let us know if you need further assistance! 👋

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [October 29, 2021, 2:29pm UTC](https://community.kinsta.com/t/able-to-connect-to-database-through-devkinsta-but-when-i-try-tun-run-site-cant-find-database/916/4 "2021-10-29T14:29:26Z")

</div>


