In MyKinsta, you can find a handy tool for doing a search and replace on your site’s content without having to install a plugin, install a script, or use the command line.

How To Use the Search and Replace Tool in MyKinsta

To locate this tool, log in to MyKinsta, click on Sites in the left sidebar, and click on the name of the website you want to run the search and replace on:

Click on the Tools tab, look for or scroll to the Search and replace section, and click on the Search and replace button:

Search and replace button in MyKinsta.
Search and replace button in MyKinsta.

There are a number of different operations you can use this tool for. In this example, we’ll change some URLs that use “http” to ones using “https” in the database.

In the search field, enter the value you want to look for in the database, and hit Search. The search and replace tool will display the number of occurrences for the given string:

Using the search field in the search and replace tool.
Using the search field in the search and replace tool.

Note: The tool is case sensitive, so searching for “WordPress” is different from searching for “wordpress.”

To search and replace, check the Replace box and enter the new text, URL, or other value in the Replace with field:

Searching for old text and replacing it with new text in the search and replace tool.
Searching for old text and replacing it with new text in the search and replace tool.

We recommend leaving the Clear cache when ready box checked to automatically purge your site’s cache after the search and replace process. That way, visitors will see the updated version of your website right away. Then, click the Replace button.

After the WordPress search and replace is complete, you’ll see a confirmation dialog showing the number of replacements that were processed. When you’re done, click Cancel to exit the search and replace tool. That’s it!

Tips and Examples

Now that we know how to use the search and replace tool, let’s go over some tips and examples.

Tips

Examples

Be sure to replace the example domains as needed.

Replace www.www.domain.com with www.domain.com

This can happen if you already had some instances of www.domain.com in your site’s content, then switched the primary domain from domain.com to www.domain.com in MyKinsta, and checked the box to Run search and replace after change.

Search: /www.www.domain.com

Replace with: /www.domain.com

Replace email address domain only

Maybe you want to use a shorter version of your domain for email sending and receiving or, for some other reason, need to replace the domain of email addresses only without affecting any other instances of the domain (e.g. in image URLs or links).

Search: @olddomain.com

Replace with: @newdomain.com

Replace http URLs with https URLs

While you can redirect HTTP to HTTPS in MyKinsta for your primary domain, you may want to update all URLs in your content as well, or there may be other URLs besides the primary domain you want to change.

Search: http://domain.com

Replace with: https://domain.com

Replace custom domain with temporary domain

If you manually migrate your site yourself and want to test your site with your Kinsta temporary URL, here’s how you can do that without affecting any email addresses in your content. Note the leading forward slash (/) and be sure also to replace sitename.kinsta.cloud with your site’s Kinsta temporary URL.

Search: /domain.com

Replace: /sitename.kinsta.cloud