"This site can’t be reached", but adminer is still accessible

Hi @devstagr @dw4y

After trying different versions of DevKinta and Docker Desktop, I believe I think I managed to replicate the issue. It appears that the problem is related to the URL containing a custom port. Even if the “Auto Detect” box in the Port selector section in DevKinsta Settings is unchecked and port 80 and 443 are set for HTTP and HTTPS respectively, the site URL can still have the custom port included when loaded. In this case, it is needed to perform a search and replace in the site’s database to update the URL.

In my case, I was getting the following error message, so I needed to do a search and replace in the database.

I used the Docker Desktop terminal to run Search and Replace in the site’s database using WP CLI. Alternatively, you could also do the search and replace through the Database Manager UI directly in DevKinsta.

Search: https://migrationproject.local:49467
Replace with: https://migrationproject.local

To use WP CLI in the terminal, I had to create an ssh user as WP CLI doesnt work with root.

  1. Add ssh user:
    adduser adrian
  2. Switch user to adrian
    sudo -su adrian
  3. Go to the the directory where the site’s wp files are ipwnstalled
    cd /www/kinsta/public/migrationproject
  4. Then finally, run search and replace:
    wp search-replace 'https://migrationproject.local:49467' 'https://migrationproject.local'

After that, my site already became accessible.

I hope it helps!