• Hello, I am trying to clone a live site and host it locally through MAMP. Before I connected the webpage to the database, I got an error message: unable to establish a connection with the server (I think I copied all the right files from my host). Then I created a database in MAMP and imported the sql file, but when I visit the localhost site I get an error stating this webpage is not available. I updated the wp-config.php with the database name, and the user-name and password to ‘root’. What am I doing wrong?

    I looked at several tutorials online, but most are from 2012 and 2013. If someone could provide detail step-by-step instructions (assuming I’m a novice), I’d be very grateful. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • With MAMP, make sure your wp-config.php database host name is set to ‘localhost:8889’. MAMP runs Apache and MySQL on non-standard ports (thus the :8889 part) for security reasons.

    Thread Starter tealeda

    (@tealeda)

    Thank you. Now the localhost site takes me to a page filled with the client’s logo, text that says, “the page you are looking for does not exist, ” and an unformated nav bar–the links don’t work. I also tried to open the admin page, but that page doesn’t exist either. What should I do now?

    Okay starting from the top:

    1) We have a server (MAMP) and it runs correctly
    2) We have a database that you created using MAMP’s PHPMyAdmin
    3) We put our WordPress files in MAMP’s htdocs folder (found at /Applications/MAMP/htdocs)
    4) We configure the wp-config.php file to use the MySQL database using root/root as UserName/Password on ‘localhost:8889’ per MAMP’s details on how to connect to the database.
    5) We now see a page with the website content (maybe?) – is this not what you expected to see? This seems bizarre as by this step you should have gotten the WordPress install page to set up a new WordPress site unless the database is already populated with the MySQL dump you mentioned.
    6) After you have a working WordPress site, you can import your MySQL dump from the previous site into the new database using PHPMyAdmin and you should then have the content showing up through WordPress.
    7) Then you would need to run a find and replace script across the database to update all the URLs to reflect that the site is now on a new domain (so change http://www.whatever-the-domain-is.com to http://localhost:8888/%5Bname of the WordPress directory])
    8) And then you should have the cloned site up and running locally.

    Thread Starter tealeda

    (@tealeda)

    I have a new, working WordPres site. Howerver, I got stuck at step 6. When I tried to import the .sql file into the database using PHPMYAdmin (clicked import, choose file, chose .sql file, open) I got an error msg. I there a step between 5 and 6 that I am missing?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Local Host Webpage not Available’ is closed to new replies.