Description
If you migrated content from another WordPress site, your posts may still contain Amazon affiliate links using your old Associates tracking tag. This plugin finds Amazon affiliate URLs across your site and replaces only the tag query parameter — never the ASIN, product path, anchor text, or any other query parameter.
Key features:
- Scan/Preview mode that never touches the database
- Batch AJAX processing designed for sites with thousands of posts
- Conservative URL parsing — only the
tagparameter is touched - Covers post content, excerpts, and custom fields (with safe handling of serialized data)
- Full rollback log per replacement batch
- No external API calls, no tracking, no telemetry
Disclaimer
This plugin is an independent tool and is not affiliated with, endorsed by, or sponsored by Amazon. Amazon and Amazon Associates are trademarks of Amazon.com, Inc. or its affiliates.
Installation
- Upload the
mushdev-tag-replacer-for-amazon-associatesfolder to/wp-content/plugins/, or upload the zip via Plugins > Add New > Upload Plugin. - Activate the plugin through the “Plugins” screen in WordPress.
- Go to Tools > Amazon Tag Replacer.
- On the Settings tab, enter your Old Amazon Tag, New Amazon Tag, choose domains and content types, and save.
- On the Scan & Replace tab, click “Scan / Preview Changes” to review what will change.
- Take a database backup, then click “Replace All” to apply the changes.
FAQ
-
Will this modify my ASIN or product URL?
-
No. Only the
tagquery parameter is modified. Everything else in the URL is left exactly as it was. -
Can I undo a replacement?
-
Yes. Go to the History & Rollback tab and click “Rollback” next to a completed replacement batch. Rows that were edited by someone/something else since the replacement are skipped automatically, to avoid overwriting newer content.
-
Does this call any external APIs?
-
No. All processing happens locally against your WordPress database.
-
Which links are detected?
-
Absolute
http://andhttps://links on the Amazon domains you select (and any subdomain of them, such assmile.amazon.com). Short links such asamzn.tocannot carry a tag parameter and are not modified. URLs whose slashes are JSON-escaped (https:\/\/) inside block attributes are not detected. -
Does it work with query separators written as & or &?
-
Yes. The separator style already used in each link is preserved.
-
Is custom field data safe?
-
Serialized values are never search-and-replaced as text. They are unserialized without instantiating any objects, only string values are changed, and the result is re-serialized. Values that cannot be safely unserialized are skipped.
-
Does the rollback log use a lot of space?
-
Each changed field stores its original and modified value so it can be restored. Deleting the plugin removes its tables and settings.
-
Does this plugin work with multisite?
-
Yes. Settings and history are kept per site, and everything is removed from every site when the plugin is deleted.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“MushDev Tag Replacer for Amazon Associates” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “MushDev Tag Replacer for Amazon Associates” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release.
