If you are an affiliate marketer who have added hundreds of affiliate links to different posts of his website and suddenly, one day the company, whose affiliate campaign you are using, change the structure of affiliate URL. How would you handle that disastrous situation? In fact you will be shuddered  thinking of updating all these broken links one by one.

Another possible condition is, if you need to change just the affiliate ID in all your affiliate links. It happens if you are sharing affiliate income with someone who is partnered with you in your website. And suddenly, your partnership is ended. In that condition, you have to create a separate affiliate account to start-over, leading to change the affiliate ID used in the URLs.

Both the two situations are terrible and can make you exasperate.

But luckily, solution is available to rescue this kind of bulk updating issues.

Also readBulk update WordPress posts’ tags, categories, status etc

And here I am telling you about all the possible ways to sort it out.

Using phpMyAdmin – The most effective way


phpMyAdmin is a panel where you can do anything with your WordPress database. When everything is in vain, you can head to your Hosting panel > phpMyAdmin and work with database tables to troubleshoot the weird issues regarding database

  • In phpMyAdmin click on the database of your WordPress
  • Then click on SQL tab and type the following code here;

UPDATE wp_posts SET post_content = REPLACE (
post_content,
Link you want to change‘,
Link that replaces existing one‘);

phpMyAdmin bulk link update

  • Here, replace the Red text with the existing link and, replace green text with the link  that you want to replace existing link with.
  • Hit the Go button. And that is all. The target link will be updated site-wide.

If you just need to update the affiliate ID

  • There is no problem if you just need to update your affiliate ID.
  • Simply replace red line with your existing ID and replace green line with new affiliate ID.

For better understanding, watch the video tutorial

With the help of this method, in a matter of seconds, you can update any text, link or even HTML in bulk.

 

Using Better Search Replace plugin

Better Search Replace

Better search and replace is a free plugin that allows us to replace anything from anything within all or selected database tables, and that is the beauty of this plugin. If our “replace requirement” is more specific Better Search Replace works great. For instance, if we want to replace some content only within comments and not in any other part of the website, we can select just wp-comments database table.

This post might be helpful if you want to update;

  • —your WordPress base URL (or want to change domain)
  • —a broken link (such as an affiliate link)
  • —affiliate ID inside links

Better Search Replace plugin download link 

[emaillocker id=2873]Download[/emaillocker]