# 404 whenever I open any sites

**URL:** https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978
**Category:** Bug Reports
**Created:** [January 5, 2023, 3:04pm UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978 "2023-01-05T15:04:34Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![WPwithHeart](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/wpwithheart/32/1756_2.png) [@WPwithHeart](https://community.kinsta.com/u/WPwithHeart)
#### Post date: [January 5, 2023, 3:04pm UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/1 "2023-01-05T15:04:34Z")

</div>

**Q: Date/Time this occurred (Provide your time zone also)**  
**A:** For hours!

**Q: DevKinsta Version**  
\*\*A:\*\*Version 2.9.0 (2.9.0.6039)

**Q: OS Version**  
**A:** Monterey

**Q: Docker Desktop Version**  
**A:** 4.15.0 (93002)

**Q: Were any error codes or messages observed? If so, what were they?**  
**A:** 404 in Browser

**Q: Detailed Description of the Problem**  
**A:** I can’t open any of my sites. It’s all of a sudden as I’ve used DevKinsta before and was able to open site.

I’ve uninstalled and reinstalled Docker / DevKinsta more times than I can count and still not getting to my sites. The config file for one of the sites is below. They all look similar to  
this.

 ![devkinsta-with-return-404](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/e/e65bec1e50969a631dde278345aa46db5bb1729e.jpeg)

---

<div class="post-metadata">

### Author: ![ZachE](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/zache/32/1683_2.png) [@ZachE](https://community.kinsta.com/u/ZachE)
#### Post date: [January 5, 2023, 9:30pm UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/2 "2023-01-05T21:30:34Z")

</div>

Hi Alicia! @WPwithHeart 👋

Would you be able to close DevKinsta, remove the NGINX site configuration file for the affected sites, and restart DevKinsta, then post the regenerated version of the NGINX configuration file for comparison?

Reference: [Seeing 404 Error for NGINX on loading local sites - #11 by Alessandro](https://community.kinsta.com/t/seeing-404-error-for-nginx-on-loading-local-sites/1930/11)

Best regards,  
Zach

---

<div class="post-metadata">

### Author: ![WPwithHeart](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/wpwithheart/32/1756_2.png) [@WPwithHeart](https://community.kinsta.com/u/WPwithHeart)
#### Post date: [January 15, 2023, 6:09am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/3 "2023-01-15T06:09:34Z")

</div>

Hi ZachE,

Sorry about the long delay between posts had to handle some time sensitive web work.

So, here’s what I’ve done:

1. Closed Kinsta

2. Updated Docker to 4.16.1 (95567)

3. Opened Kinsta

4. Started a site and still get 404 when I try to access it or any of the sites.

Here’s my file:

 ![kinsta-confg](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/5/5992ca0f48540e47534f5c597358b59faa17133a.jpeg)

---

<div class="post-metadata">

### Author: ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)
#### Post date: [January 16, 2023, 2:33am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/4 "2023-01-16T02:33:27Z")

</div>

Hi Alicia 👋

Thank you for your reply.  
Can you please close your DevKinsta completely (not only minimized, but fully shutdown), and once fully closed/shutdown, please open the terminal program on your Mac, then go to this sub-folder with this command:  
`cd ~/DevKinsta/nginx_sites`

and then, please remove / delete that **sub-pacific-solar.conf** file under that sub-folder mentioned above (or you can simply just rename it to something else with something like: `mv sub-pacific-solar.conf sub-pacific-solar.conf.old` ).

After that, please try to open DevKinsta again, and it should re-generate the new .conf file of that particular site and it should work after that.

Please let us know again if you’re still experiencing any issue with it.

Cheers,  
Agus

---

<div class="post-metadata">

### Author: ![WPwithHeart](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/wpwithheart/32/1756_2.png) [@WPwithHeart](https://community.kinsta.com/u/WPwithHeart)
#### Post date: [January 21, 2023, 1:07am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/5 "2023-01-21T01:07:34Z")

</div>

Now I’m getting " Error establishing a database connection".

The file looks different, however…

 ![new-config-file](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/a/a7cb07e92d14dca5830a57804751ffad0fee4d61.jpeg)

---

<div class="post-metadata">

### Author: ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)
#### Post date: [January 23, 2023, 9:38am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/6 "2023-01-23T09:38:00Z")

</div>

Hey @WPwithHeart ,  
Can you please test the MySQL connection by doing the following:

1.Open Docker and click on the three dots menu of the devkinsta\_db container  
2.Click on Open in terminal

 ![Screenshot_2023-01-23_at_08_49_12](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/b/bf95689559d8b4a571656d29abf4aed0d11ea6c8.png)

Once there, use this command being sure to update `PASSWORD`, `DATABASEPORT` and `DATABASENAME` with those you see inside DevKinsta

`mysql -u root -pPASSWORD -h localhost -PDATABASEPORT DATABASENAME`

What does the terminal reply with?

Regards,

Alessandro

---

<div class="post-metadata">

### Author: ![WPwithHeart](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/wpwithheart/32/1756_2.png) [@WPwithHeart](https://community.kinsta.com/u/WPwithHeart)
#### Post date: [January 25, 2023, 3:04am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/7 "2023-01-25T03:04:30Z")

</div>

ERROR 1049 (42000): Unknown database ‘Sun\_Pacific\_Solar’

---

<div class="post-metadata">

### Author: ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)
#### Post date: [January 25, 2023, 5:14am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/8 "2023-01-25T05:14:34Z")

</div>

Hi Alicia,

That error `ERROR 1049 (42000): Unknown database ‘Sun_Pacific_Solar’` means that the database in question ( Sun\_Pacific\_Solar ) is unknown/not available (does not exist) on your local computer (inside the `devkinsta_db` container). And that might be the reason why you’re getting: `" Error establishing a database connection"`.

You can try to run the following mysql command line in that same devkinsta\_db terminal (to check if the database in question does exist/available in that container or not) - and be sure to update the `PASSWORD` and `DATABASEPORT` with those you see inside your DevKinsta :

> mysql -u root -pPASSWORD -h localhost -PDATABASEPORT -e “show databases;”

that will show all databases you have inside that devkinsta\_db container.  
See if you notice the proper database name that should be used by that _sub-pacific-solar.local_ site ?

Cheers,  
Agus

---

<div class="post-metadata">

### Author: ![WPwithHeart](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/wpwithheart/32/1756_2.png) [@WPwithHeart](https://community.kinsta.com/u/WPwithHeart)
#### Post date: [January 25, 2023, 7:13am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/9 "2023-01-25T07:13:16Z")

</div>

Hi Agus,

I had a database. It’s gone, somehow.

I’ve moved back to Local by Flywheel.

Sorry. Can’t risk losing sites.

---

<div class="post-metadata">

### Author: ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)
#### Post date: [January 25, 2023, 8:37am UTC](https://community.kinsta.com/t/404-whenever-i-open-any-sites/1978/11 "2023-01-25T08:37:10Z")

</div>

Hello @WPwithHeart ,  
Most probably, the database has been removed when Docker has been uninstalled and then reinstalled. While the files of your sites are saved in a standard folder, the databases are stored inside a Docker Volume, uninstalling Docker causes a loss of data.  
We’ll be here in case you would like to give this another go in the future 👋

Regards,  
Alessandro
