Forced Redirect on a server migration

Here’s a clean and sure way that I follow when I migrate a WordPress to a new domain (or subdomain):

  1. Go and download Interconnect IT’s Database Search & Replace Script here
  2. Unzip the file and drop the folder where your WordPress is installed (the root) and rename the folder to replace (screenshot)
  3. Navigate to the new folder you created in your browser (ex: http://old.example.com/replace) and you will see the search/replace tool
  4. In the “search for…” and “replace with…” fields:
    • Replace: https://example.com (old domain)
    • With: http://old.example.com (new domain)

You can click the dry run button under actions to see what it will be replacing before you execute the script. Once you’re done be sure to remove the /replace/ folder.