SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist WebMachine's Avatar
    Join Date
    Jun 2007
    Location
    Ontario, Canada
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    local WP installation login and navigation redirects to live site??

    I converted an existing site into a cms using WP locally, tested it and it worked fine. Then I published a version of this site on the internet. I was having problems with the permalinks, and trying things with .htaccess. I think in the process, I deleted my .htaccess file from my local site. Now when I try to login in to my local admin area, I get redirected to the live site! and my local site pages link to the live site (with pages not found). How do I fix this mess?

  2. #2
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    There is a setting in Wordpress under Settings > General called "Wordpress address (URL)" and "Website address (URL)" - They should match the server that you're running that instance of Wordpress off.

    If you migrated the site by importing your local DB into the live DB (or vice versa) you'll need to change that setting.

    From memory it's a setting in the wp_options table (if you used the default prefix on your tables).

    Changing that setting won't change links in your content though that are linked with a fully qualified URL.

    Normally when I migrate from Local to Live (or vice versa) I simply run a Search and Replace on the SQL file.
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  3. #3
    SitePoint Evangelist WebMachine's Avatar
    Join Date
    Jun 2007
    Location
    Ontario, Canada
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I will try that tomorrow morning. But my problem is that I can't get into my local WP dashboard to change those settings ... can I do it through the database instead maybe? It redirects me as soon as I try to log in.

  4. #4
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Yeah, it should be possible to do this directly in the DB
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  5. #5
    SitePoint Evangelist WebMachine's Avatar
    Join Date
    Jun 2007
    Location
    Ontario, Canada
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That did the trick. Thanks for all your help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •