Update your site URL with Better Search Replace for WordPress

Sometimes it is needed to update the domain URLs for your site. The most normal use case is when you transition a site from being in development to production.

We do supply commands for doing this with WP-CLI, but that might be too technical for some. So we will instead take a look at a plugin called Better Search Replace which should be easier to operate. Under we will go through everything to get it up and running.

Time needed: 5 minutes.

Step-by-step guide on how to use Better Search Replace:

  1. Install Better Search Replace

    Navigate to the plugins section of your wp-admin. Search for Better Search Replace in the right field. Click install and activate for the first plugin.

  2. Navigate to plugin

    In wp-admin, navigate to Tools > Better Search Replace.

  3. Enter URLs

    In the two first fields you will see what URL to search for and which URL you want to replace it with. So enter your current domain URL in the first field and the domain URL you want to replace it with in the second.

  4. Select database tables

    To change all instances of the domain URL in your database simply select all tables. You can do that by clicking the tables field and enter CMD + A for Mac or CTRL + A for Windows.

  5. Disable dry-run

    Disable the “Run as dry run” option. As dry-running will only simulate the search/replace and not actually do the search-replace.

  6. Run Search/Replace

    Lastly click the “Run Search/Replace” button and you are done!

And as always, should you have any additional questions please don’t hesitate to contact our support chat at servebolt.com!

Give us your feedback on this article