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,326
    Likes Received:
    70
    Location:
    Tasmania
    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,848
    Likes Received:
    4
    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,326
    Likes Received:
    70
    Location:
    Tasmania
    Fuck I feel retarded, I hadn't thought if that :rofl:

    Thanks..
     
  4. biawokauns

    biawokauns New 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:
    55,918
    Likes Received:
    10
    Location:
    Los Angeles
    In for destruction.
     
  6. Insert Tokens

    Insert Tokens Making Cancer My Bitch OT Supporter

    Joined:
    Jan 12, 2006
    Messages:
    8,326
    Likes Received:
    70
    Location:
    Tasmania
    :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