Support » Localhost Installs » migrating from server to localhost

  • I would like to migrate my wordpress website to my localhost,so I installed xampp then I’ve upload my database on phpmyadmin and moved my website page to htdocs after that I updated the wp_options, wp_postmeta, wp_post links to my localhost link. So now when I open my website some images disappeared from my home page. I can’t find why in the web. Someone can help me?.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Tried running this?

    
    UPDATE <code>wp_posts</code> SET guid = replace(guid, 'oldurl','newurl');
    UPDATE <code>wp_posts</code> SET post_content = replace(post_content, 'oldurl', 'newurl');
    UPDATE <code>wp_postmeta</code> SET meta_value = replace(meta_value,'oldurl','newurl');
    

    yes, but it didn’t work

    • This reply was modified 2 months, 3 weeks ago by dvdt101.

    The best way I have found is with a backup restore plugin that does it all for you. I always use Akeeba BackupWP and Kickstart to restore the site and make all the necessary db updates. Akeebabackup.com

    My preferred way to do this is to configure the localhost server to use the “VirtualHost” technique. Give it the same domain name, use your “hosts” file to tell your b rowser to redirect to the localhost server. The website barely knows that it has moved. Files and databases can be exchanged easily, especially when I match the database names and user etc from wp-config.php.
    Configuring SSL is a little harder, similarly configuring email SMTP is not worth the trouble.
    More details:
    http://httpd.apache.org/docs/current/vhosts/name-based.html
    https://en.wikipedia.org/wiki/Hosts_(file)

    danthefan

    (@danthefan)

    Take a look at the source code of your site ( CTRL-U ) and check the tags and their “src” attribute. There you should see what exactly is wrong. I have a feeling it’s the path.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.