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?

In this article, I'll share with you how to do that with a free plugin and under 5 minutes.

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-o
    Change 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-circle
    Web visitors will have bad experience with your site
  • check-circle
    High 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!

Why You Must Clean Up Your WordPress Database from Time to Time

This blog post is contributed by a guest blogger, Sujain Thomas. Sujain Thomas is a website developer and she also has years of experience in data management. She has written extensively on how database management is necessary for improving a website’s performance.

Are you worried about the loading time of your website? Have you been hearing complaints that it takes too long for the site to load, and some of the pictures do not load even after waiting for several minutes? Then, surely there is a need for you to look into the performance of your website. The chances are that the bounce rate on your site is quite high since people do not like waiting around for too long. In fact, according to studies, people abandon a website in favor of another if it takes more than a few seconds to load.

 

Why is it essential to monitor the load time of your website?

website loading speed

Yes, just a few more seconds can have a significant impact on the search engine optimization and popularity of your website. It would not be wrong to say that for each second more your site takes to load, the abandon rate on your page rises. Kissmetrics states about 47% of consumers expect a website to load within two seconds or less. Moreover, 40% of consumers abandon a web page that requires over three seconds to load. Today's websites are responsive and attempt to create a seamless experience for visitors across devices. Did you know that 73% of mobile internet users have said that they have encountered a web page that was too slow in loading? Are you sure, yours is not one of them?

You must be wondering if there is an easy way to shave a few seconds off the load time of your website. In case you are using WordPress for your site, and it has been running for only a few months, you are probably in luck. Cleaning up your website's database might be the only thing you need to do to boost the load time of your site.

 

Why does your WordPress database require cleaning?

cleaning wordpress website

You are probably aware of the fact that WordPress uses PHP and MySQL PHP is a programming language is used for fetching and displaying the information that is stored in a MySQL database. As you are always making changes to your website, updating and editing data and design, there are probably a lot of elements in the back-end that you required at one point of time but do not anymore. These unnecessary items can slow your website, adversely affecting the load time. Clean up of every aspect starting from posts, comments, meta titles and descriptions, options, terms may be required to optimize your database.

 

Why must you backup your database?

Backup WordPress Website

Since your database has all the information that is required to run your website, experts from RemoteDBA.com suggest backing up your database before the cleanup. In case, you mistakenly delete something that you were not supposed to, you can end up the appearance and performance of your website. Thankfully, with the right plugin, taking your website's backup is not a very difficult task. You must read up on WordPress plugins a bit to find out which ones suit your requirement the most.

Now that you know how the maintenance of your database is vital for the correct functioning of your website, you must chalk out a plan for database clean up from time to time. Assess the performance your website and figure out when is the time that you will be okay with the minimum bit of downtime. Since you are using WordPress, you can be sure that the downtime will be minimum.