Question

My friend made a wordpress site using a theme which he would like me to tweak a little bit for him. So I downloaded the whole site using FTP and I am trying to run it through MAMP locally, but when I open localhost:8888 I get an error in the browser that says Error establishing database connection. Is there a way to create a dummy database, so that I can view the frontend of this site locally?

Was it helpful?

Solution

You get this message if your wp-config.php doesn't contain data that allows the site to establish a connection to a database.

You should make a fresh wordpress installation which will create necessary DB tables (you'll have to provide an empty database on your localhost and insert correct info into wp-config.php). After that download only the theme your friend created and set it as active.

If there are crucial plugin dependencies in the theme you'll also have to download the plugins... And if some data that is necessary for the theme display is located in your friend's database - you'll have to export his entire database and import it at your MAMP.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top