WEB I haven't done SQL in ages, quick help?

Discussion in 'OT Technology' started by Insert Tokens, Apr 19, 2010.

  1. Insert Tokens

    Insert Tokens Making Cancer My Bitch OT Supporter

    Joined:
    Jan 12, 2006
    Messages:
    8,719
    Likes Received:
    322
    Location:
    Mel-borne
    I moved a site for a friend.. now I need to replace every single occurence of his old domain name in the database, with the new domain name. It's in all diff tables, config tables, comment fields, etc..

    Is there a quick way to replace every single occurenct of "oldsite.net" with "newsite.net"?
     
  2. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,866
    Likes Received:
    11
    Location:
    md
    Easiest way is probably dump the database to a file, and search and replace in a text editor.
     
  3. Insert Tokens

    Insert Tokens Making Cancer My Bitch OT Supporter

    Joined:
    Jan 12, 2006
    Messages:
    8,719
    Likes Received:
    322
    Location:
    Mel-borne
    Fuck I feel retarded, I hadn't thought if that :rofl:

    Thanks..
     
  4. biawokauns

    biawokauns Active Member

    Joined:
    Sep 18, 2001
    Messages:
    19,893
    Likes Received:
    0
    Location:
    Republic of Kalifornia
    this won't end well
     
  5. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    56,155
    Likes Received:
    166
    Location:
    Los Angeles
    In for destruction.
     
  6. Insert Tokens

    Insert Tokens Making Cancer My Bitch OT Supporter

    Joined:
    Jan 12, 2006
    Messages:
    8,719
    Likes Received:
    322
    Location:
    Mel-borne
    :rofl:

    It's not a big database.. just a WP site. I replaced the basic config paths etc manually and it all works fine.. and when searching the database the only results left are in content links and comment links.. and I just cbf going through updating them all myself.
     

Share This Page