0

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.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
0

Did you check if the table prefixe in wp-config is same as per your database..

To check the table prefix of your database go to phpmyadmin. Click on your database and expand it If you notice in following image , you will find out that all the table have prefix "wp_" .. so that means in your wp-config this should be the setting

$table_prefix = 'wp_';

else if you see some thing else in phpmyadmin , then you can replace wp_ in above setting as per your database

enter image description here

Please let me know if this fixes your problem

  • Yeah, I did not alter my database. So, the "wp_" prefix is correct in my DB as well as my wp-config.php file. Any other thoughts? – Kellen May 9 '17 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.