Mass Edit Links (6 posts)

  1. Louno
    Posted 7 years ago #

    I have a wordpress blog and would like to edit some of the links all at once...

    Basically, i have tons of outbound links ( links that point to someone else page ) but i need to change alot of those links to point somewhere else... so it would be great if there was a plug that would work like this :

    scan all post for :
    Original url : http://www.sitename.com/pagename-xyz.html
    and replace with New url : http://www.whateveriwant.com/whatever-xyz.html

    is there something that will do this ?

  2. Louno
    Posted 7 years ago #

    Sorry, i made a mistake,
    i need to edit PARTS of the link, so for example
    instead of


    I need to change that url for something like this


    so the plugin needs to look for a variable : "category1"
    and replace it with : "category2"

    The reason is simple, its because if i have to change all the url manually it would still be a very long process, where as if i can tell the plugin to just look for the part i want to change and change it in all links then that would save alot of time as ill only have to do this operation 2 or 3 time and it will fix all my links

  3. bpetruzzo
    Posted 6 years ago #

    I know this is an old post, but I just solved the problem for myself and for the sake of future searchers, I figure I'll post my solution here too.

    1. I downloaded my wordpress database and saved it as a backup.

    2. I copied the backup to another location and opened it in a text editor (text wrangler in my case).

    3. I searched for the old domain name, then used the 'replace all' command to replace it with the new domain name. It found several thousand instances of the old domain and replaced them all.

    4. In PHPmyAdmin, I dropped all the tables then imported my modified database file. All of my links were fixed.

  4. Louno
    Posted 6 years ago #

    that would work... but its not really "elegant" :P
    thanks for sharing though

  5. bpetruzzo
    Posted 6 years ago #

    Hey, do what you gotta do, right! :)

  6. seborgarsen
    Posted 6 years ago #

    What would be the elegant solution?

Topic Closed

This topic has been closed to new replies.

About this Topic