• Skip to primary navigation
  • Skip to main content
  • Skip to footer
WPOrbit

WPOrbit

WordPress Hosting with Support & Maintenance

  • Home
  • Services
    • Rate Card
    • Site Performance Optimisation
    • Malware Clean Up
  • Blog
  • Contact
  • Login

Replace Amazon SiteStripe Image links in Bulk on WordPress

November 24, 2023

Recently Amazon announced they are shutting down SiteStripe Image and Text+Image feature on their Affiliate portal. We had a request from one of our customers how they could bulk update hundreds of their posts containing SiteStripe image links from Amazon. It is a tedious task to manually download each image, save to media library and update it via the affiliate HTML code in your post.

(Note: This method only replaces Image links but not Text+Image, we will be working on a solution for Text+Image links soon)

Prerequisites

  • You must know how to use file manager to create files and folders
  • You must know how to replace text in PHP code
  • Please take a full backup of your site before running such scripts

We will be creating a PHP script and execute it on browser to do bulk search and replace operation. The script is designed to do the following:

  1. It goes through all your posts
  2. Scans the links containing URL amazon.com
  3. Searches for images within the link that have their URL as amazon-adsystem.com
  4. Downloads the images to a folder called amazon_images on your server
  5. Replaces the Amazon images with downloaded images

Step 1: Create a PHP file

You will need to access your web host File Manager via FTP or cPanel. Once you are in your file manager, you can create a PHP script (file) and give it a name, for example: test.php. This file should be created in your WordPress root folder (the folder containing your wp-config.php file)

Edit the test.php file and add the code below within it:

Save the file.

Step 2: Time to execute the code

Open a new tab in your browser and run the test.php script by accessing it directly: For example: https://wporbit.net/test.php

Let the script run, could take a while depending on how many links you have.

Congratulations! You’ve now replaced all Amazon Image links on your site.

We understand this code might not be perfect or suit every site, feel free to comment down below if you face any issues or hire us to do it for you.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer

CONTACT SUPPORT

Email Us

Create a Ticket

Launch Live Chat

SERVICES WE USE

LINKS

FAQs
Cancellation & Refund Policy
Privacy Policy
Terms of Service
Contact Us

Copyright © 2025 · WPOrbit