Search and Replace

After the DNS change has been completed we need to run the Search2Replace script to fix URL issues.

Warning

Please pay special attention to every step. This script could completely destroy the database. You must back up the entire site in the WP Engine portal before you begin. 

1. Download Script

Download the script here
Download V 3.1.0

2. Login to the WP Engine Portal to create a backup of your install

Back up your website within the WP Engine portal by going to Install Name > Backup Points > Click on Back Up Now. You can call the backup description anything you’d like.
backupScreen Shot 2015-03-04 at 4.55.55 PMScreen Shot 2015-03-04 at 4.56.06 PM

3. SFTP into your install

Upload the entire folder (the one your downloaded in step 1) into the root of your install. Give the folder a name. You can call this folder any name you want.
search

Once you have uploaded the folder into the root of your website, navigate to it by going to it with the appropriate link.

Example: to navigate to the folder called random-name (see the above image) you would go to http://domain-name.tcu.edu/random-name

4. Fill out form fields

Once you navigated to the correct URL in your browser window, you should see a form. Fill out all appropriate fields.
Screen Shot 2015-03-04 at 4.20.25 PM

The wp-config.php file inside your website should contain all the database information you will need to connect the script to your database. You can use the image below to locate the wp-config.php file inside the root of your install.
config file

For security purposes, we have hidden the data. On your wp-config.php file the red boxes in the image contain the answers to the database fields.
config-inside

5. Fill out the “replace” and “with” form fields

In the replace form field, enter the string to search for in the database.
In the with form field, enter the string that you want to replace it with.

Example: Search for tcuade.wpengine.com AND replace it with ade.tcu.edu


search-replace

6. DELETE the search/replace folder file 

Purge cache from WordPress dashboard
WP Engine tabpurge-caches

Make sure everything is working correctly!