WordPress.org

Ready to get started?Download WordPress

Forums

Localhost WP issues... (11 posts)

  1. bdigges
    Member
    Posted 2 years ago #

    So I setup XAMPP and a local installation of WP for development purposes. I uploaded the database from my web-server onto localhost/myphapadmin and altered the config file for my WP installation accordingly.

    Everything seems to work fine except that when I try to log onto my wordpress installation via localhost it just redirects me to the live website that I exported from...

    What gives?

  2. fonglh
    Member
    Posted 2 years ago #

  3. bdigges
    Member
    Posted 2 years ago #

    So what would I change it to in this instance? localhost/wordpress/[anysite]?

  4. mygreenhosting
    Member
    Posted 2 years ago #

    bdigges,

    Here's the basic thing you need to do when migrating your wordpress site to any location eg. localhost or remote servers:

    Migrate all files

    Export database and do a search and replace query to modify the
    following:

    file paths to the target paths

    site url instances to target url

    Dump the updated sql file/database to target database

    Configure wp-config accordingly.

    If you follow these properly you will not have any problem.

    Regards,

    MyGreenHosting

  5. bdigges
    Member
    Posted 2 years ago #

    "file paths to the target paths

    site url instances to target url"

    This is the part that I don't quite understand. Could you elaborate?

  6. mygreenhosting
    Member
    Posted 2 years ago #

    bdigges,

    file paths to the target paths :

    this is the link for a file that i used in your system.

    example: home/public_html/wp-include
    3232dsd/var/www/vhost/site/wp-include

    these paths are saved in your database, Thus, you will need to modify it so your system locates the needed files in your local system.

    site url instances to target url:

    this is the url of the original site which you would want to change to your local link/url.

    example: from http://www.site.com to localhost/site

    this could be the reason why your site is pointing back to the livesite when you try to navigate your site locally.

    Regards,

    MyGreenHosting

  7. fonglh
    Member
    Posted 2 years ago #

    You need to change it to the URL used to access your local XAMPP server. That's probably localhost/<sitename>, but it really depends on how you've configured your web server.

  8. bdigges
    Member
    Posted 2 years ago #

    I changed the site url from my live WP site and now I can't get there to access the admin to change it back. Help?

  9. mygreenhosting
    Member
    Posted 2 years ago #

    bdigges,

    Can you explain how you changed your url?

    Regards,

    MyGreenHosting

  10. bdigges
    Member
    Posted 2 years ago #

    I went to the admin panel -> Settings -> General and changed it to http://localhost/site

    but afterwards I was unable to login...I fixed it, sorta, by changing the 'site url' and 'home' columns (I think they're called that) in myphp.

    I can see the homepage now, but none of my links are working. Could you help me?

  11. mygreenhosting
    Member
    Posted 2 years ago #

    Hi bdigges,

    As I said on the above advice.

    You may want to export first your database.

    Open it in notepad or notepad++

    do Search And Replace

    From : live url to your local url

    From : live file paths to your local file paths

    Then everything will work properly.

    You can post here whats your livesite link and your local link

    and livesite file path and local file path

    So i Can best assist you on what to search and replace.

    Best Regards,

    MyGreenHosting

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.