Step by Step Guide To Find And Replace URLs In Your WordPress Database

How do you find and replace URL in MySQL? 

How do you find and replace text in WordPress database?

Insert Video

I encountered this problem yesterday and it was annoying. I moved to a new web host from a managed WordPress hosting to Cloudways. The problem was all fine until I noticed that half of my site links are broken. Previously, the links were working because I did a redirect but after moving to a new web host, that method doesn’t work anymore.

I scrambled to figure out a way to find and replace URL in MySQL but I have zero idea how to get that work. I came across this article by Interconnect/it about a script that can find and replace text in WordPress database. I’m not sure what I did but it doesn’t work.

Important note: If you are planning to use the script to change the WordPress database, make sure you did a full backup!

I was literally back at square one I want to get the 404 errors fixed as soon as possible to optimize my WordPress site for SEO. Sh*tty stuffs, honestly.

Thankfully, I met up with Muneeb from Cloudways and he recommended me to search for WordPress change URL plugin.

The light bulb moment strike!

The Hunt Begins To Find The Best Plugin To Find And Replace Text In MySQL

There are over a dozen of plugins that offers find and replace texts in WordPress database.

find and replace text plugin

I decided to go with Search & Replace by inpsyde GmbH because it has over 100,000 active installations as a safe bet.

Installing Find And Replace Text Plugin

Here are the steps I took to install the plugin.

Start by searching for the plugin on your WordPress dashboard. You should search for “Search & Replace” for faster and accurate search results. Locate the plugin and click on the “Install Now” button.

install find & search plugin

Once you have install the plugin, it is time to activate it.

how to activate a wordpress plugin

The next step involves searching for the plugin and head over to the settings.

search and replace text in wordpress database

You will see this screen and I highly recommend you to do a full backup by clicking on the “Create SQL File” button as seen below.

Important: Please backup your WordPress site before find and replace URL in MySQL database!

how to use find and replace url plugin in wordpress

The next two steps are critical. Messing these up will crash your site. Start with filling up the “search for”and “replace with” columns.

how to replace url in WordPress database

The last step involves searching the relevant tables. I suggest you go with “Select All Tables” for the best results. You should select “Save changes to Database” instead of “Export SQL file with changes.”

Selecting the export option will not find and replace text in your WordPress database. Complete the find and replace URL by hitting on the blue button.

how to find and change text in wordpress database

The whole process will take around 5 to 30 minutes depending on the size of your WordPress database.

Find And Replace URL In WordPress Database Without Coding

By using a find and replace URL plugin, you don’t have to get your hands dirty by doing the tedious database search and replace script in php.

This plugin allows you to change quite a lot of things in your WordPres database including:

  • Find and replace MySQL query WordPress
  • phpMyAdmin search
  • Update image links in WordPress database
  • check-circle-oChange and update WordPress URLs in database when site is moved to new host

With this simple and free plugin, you no longer need to hire web developer to find and replace text in your WordPress database!

Why Should You Find And Replace URLs In Your WordPress Database?

  • Broken links are bad for SEO
  • You will lose potential traffic
  • You will lose potential revenue from affiliate sales
  • check-circleWeb visitors will have bad experience with your site
  • check-circleHigh bounce rate

When Should You Find And Replace URLs In Your WordPress Database?

  • When you change domain URL
  • Change and update WordPress URLs in database when site is moved to new host
  • Had redirection on (and wanted to fix links)

What do you think?

I hope you find this tutorial useful and you will be able to find and replace URLs on your WordPress database easily. Leave a comment below and tell me what you think!

Leave a Comment