Error connecting/selecting the database

Issue Summary

I simply wanted to import an existing live website into Local. It’s been a week, I’ve tried everything, from the “just drag and drop the zip file” to the All-in-one WP Migration plugin. Nothing worked.

My current attempt: I have created a Local website to host the copy of the existing website, the website files are copied locally in /app/public/, I have exported the SQL and imported it into the local Adminer, I made sure the credentials were the same in the wp-config.php file as written in the Database tab in Local, but still have a screen saying:

“Error when connecting to the database”, “Impossible to select the database - The database server is not connected (which means your ID and password are correct), but the database globalpotential cannot be selected”

What shall I do?

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    Shall I really try importing another live existing website to see if there’s a difference?

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes, I am.


  1. Create a plain Local website
  2. Choose an existing live website
  3. Copy all the files from the existing live website to the local folder
  4. Export the SQL dump of the existing live website
  5. Import the SQL dump in the Local website Adminer
  6. Edit the wp-config.php file according to the info displayed in the Database tab in Local
  7. Hope it works

System Details

  • Which version of Local is being used? 6.5.2+6204

  • What Operating System (OS) and OS version is being used?
    Windows 10 Family

Hi there @Valooo -

Have you happened to try the BackWPup plugin as recommended in this help doc?

Let me know,


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.