We are about to purchase a site that uses Amazon affiliate links.
Naturally, they have their own affiliate ID, Amazon affiliate links look like this:
http://www.amazon.com/gp/product/productcode/?tag=affiliateID-20
What would be the best way to alter the ending string for these links’ URL’s in a WordPress blog?
DISCLAIMER : Not a WordPress Developer, Just a MySQL DBA
For a given table, say
link_url
and you have Amazon Links like this one:
and you want to replace the number 20 with some other number (like 253) so that URLs are now
Run the following SQL script
Give it a Try !!!
I’ve had some success with this plugin: Search and Replace. You can enter the full URL (including the old affiliate ID) and replace it with the full URL including your new affiliate ID.
Similar to Jared’s answer I’ve used the Velvet Blues Update URLs plugin to you know, update URLs. 🙂 If all the URLs are in the content that should be sufficient. If you think that some URLs might be lurking in other places, like meta/options then you might want to try the Serialized PHP Search and Replace script. I used it recently to move WP to a new server and it was perfect and perfectly simple. I think either would do you well.