Forums

Moving WP to local machine using Mamp and a Mac (3 posts)

  1. smjohn
    Member
    Posted 3 years ago #

    I have a domain, http://www.mydomain.com/blog, I want it to move to my local machine. I am using mamp server with Leopard as my OS.

    I copied all the files to my machine to blog folder and took the backup of db and replaced all instances of http://www.mydomain.com/blog with http://localhost:8888/blog/ and imported it.

    When I run http://localhost:8888/blog/, the index page opens the remote http://www.mydomain.com/blog instead of my local copy of the blog.

    Any ideas what I'm doing wrong?

    I've created wordpress blogs locally before. I've never had to move one from a remote server to my local system though.

  2. rhysbwaller
    Member
    Posted 3 years ago #

    im having exactly the same problem.

    this seems like a common issue...

  3. kimmeehh
    Member
    Posted 3 years ago #

    Your database has references to the external blog. You should do a couple of things to get it working (or maybe you already have, in this case this reply is for future reference):

    your config file of wordpress

    define('DB_NAME', 'insert databse name here');
    define('DB_USER', 'root');
    define('DB_PASSWORD', '');
    define('DB_HOST', 'Localhost');

    Localhost with capital!

    in your sql-window, type

    UPDATE wp_options SET option_value = REPLACE(option_value, 'http://www.your-livesite.com', 'http://your-local.site') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE wp_posts SET guid = REPLACE(guid, 'http://www.your-livesite.com','http://your-local.site');
    UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.your-livesite.coml', 'http://your-local.site');

Topic Closed

This topic has been closed to new replies.

About this Topic