MushDev Tag Replacer for Amazon Associates

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 tag parameter 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

  1. Upload the mushdev-tag-replacer-for-amazon-associates folder to /wp-content/plugins/, or upload the zip via Plugins > Add New > Upload Plugin.
  2. Activate the plugin through the “Plugins” screen in WordPress.
  3. Go to Tools > Amazon Tag Replacer.
  4. On the Settings tab, enter your Old Amazon Tag, New Amazon Tag, choose domains and content types, and save.
  5. On the Scan & Replace tab, click “Scan / Preview Changes” to review what will change.
  6. Take a database backup, then click “Replace All” to apply the changes.

FAQ

Will this modify my ASIN or product URL?

No. Only the tag query 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:// and https:// links on the Amazon domains you select (and any subdomain of them, such as smile.amazon.com). Short links such as amzn.to cannot 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.

Contributors

Changelog

1.0.0

  • Initial release.