Cloned site not connecting to database – MAMP


First off, I’m a WordPress noob, so I apologize if there is an easy solution. I’m trying to get a live website working on my local MAMP environment. I’ve successfully cloned the git repo into the htdocs directory in MAMP. I also also created a database within phpmyadmin called ‘landing’. Once the database was created, I imported a fresh copy of the production site’s database.

After the database was set up, I renamed the wp-config-example.php file to wp-config.php and added the following properties:

define('DB_NAME', 'landing');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'root');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Nonetheless, when type in my local site’s URL, it takes me to the WordPress install page. Am I missing a step? I’ve already double checked the database name, username, and password to make sure they are accurate.

Edit: I eventually realized that I was using the wrong prefix. Instead of “wp_”, the prefix used is “wp_landing”. However, when I made the change, my site become unaccessible. It throws the following error:

This site can’t be reached
localhost refused to connect.
Checking the connection
Checking the proxy and the firewall
, , , Kellen 6 years 2017-05-08T15:52:50-05:00 0 Answers 82 views 0

Leave an answer