Replace all links in WordPress

Discussion in 'WordPress' started by miccy, Aug 29, 2010.

  1. #1
    Hi,

    If you guys don't mind i would like to ask how to change all the links in my wordpress blog. I know how to use Search and Replace but there is no guide how to also change the different sub of the links. For example, i want to change http://www.example.com/blabla/* (different links) to http://www.newlinks.com, you see there is a lot of different links need to be change.

    I hope you guys could help me.

    Thanks!
     
    miccy, Aug 29, 2010 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Cash Nebula, Aug 29, 2010 IP
  3. miccy

    miccy Well-Known Member

    Messages:
    850
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Thanks, but actually i already stated in the first post that i already tried search and replace, the problem is i want to change the sub of the links. Let me quote my first post
    Any help would be really appreciated.
     
    miccy, Aug 30, 2010 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ah sorry, I zoomed in on the links and overlooked that part :eek: No matter, you actually can change them with that plugin.
    Put http://www.example.com/blabla/ in the first box and put http://www.newlinks.com/ in the second box.
    It will substitute that part of each link but leave the rest untouched. I tested it with one link and it worked fine.
     
    Cash Nebula, Aug 30, 2010 IP
    miccy likes this.
  5. miccy

    miccy Well-Known Member

    Messages:
    850
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    128
    #5
    Again, thanks for your reply but actually i would like the rest of /blabla/ such as /blabla/etcetc to be substitute also with the http://www.newlinks.com I hope you can help me how to use it with the plugin. I am very appreciate your help. Anyway, i repped u,
     
    miccy, Aug 30, 2010 IP
  6. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok, that is a problem. The MySQL replace function only takes fixed strings, not wildcards. Search and Replace won't work because it uses that function.

    I think you can change the links using phpMyAdmin but I don't know what SQL command to use. Maybe someone in the MySQL forum can help you.

    Thanks for the rep but I probably don't deserve it :eek:
     
    Last edited: Aug 30, 2010
    Cash Nebula, Aug 30, 2010 IP
  7. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #7
    You would need to use phpmyadmin and some sql queries to do this.

    See here and if you want to see more examples, this google search.

    The best way to do it is to copy your Wordpress database then upload it again using phpmyadmin -- that's the database you should work on -- the copy. That way you have as many chances as you need in case you make a mistake or three. If you do, drop the database and upload it again.

    You are also going to have to do it in stages so that you get through all of the versions of the links you want to replace:
    /blabla/ , /blabla/etcetc , /blablablablabla ,.., <<-- your search strings -- i.e. http://whateverthedomain.com/blabla
     
    mcfox, Aug 31, 2010 IP
  8. liveallinfo

    liveallinfo Peon

    Messages:
    317
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    liveallinfo, Aug 31, 2010 IP
  9. craigedmonds

    craigedmonds Notable Member

    Messages:
    706
    Likes Received:
    135
    Best Answers:
    0
    Trophy Points:
    235
    #9
    This is how I do it.

    I dont use phpmyadmin though I use Navicat for Mysql. Totally rockin remote mysql management tool.
     
    craigedmonds, Aug 31, 2010 IP
  10. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #10
    That looks very interesting software. I might look into it a bit further. :)
     
    mcfox, Aug 31, 2010 IP
  11. secci

    secci Peon

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    secci, Sep 1, 2010 IP