The decision to migrate a WordPress site is never easy. Even if the migration in question is something that would benefit the website and you as the owner – a rebranding-driven domain name change, for example – it’s still a process that can help you. leave a lot of work to do. Updating all URLs is just the kind of work you will have to do.

Luckily we have WordPress plugins, though! With them, you can do the tedious task of updating URLs after your WordPress site migration in a snap. And we’ll show you how!

In this article we will cover:

Why would you need to update URLs after migrating a website?

Why would you need to update URLs after migrating a website

When WordPress assigns URLs to things like files, pages, or posts on your website, they are stored in a database. When you do anything that changes URLs – change the domain name, add an SSL certificate, or even move parts of the website to a subdirectory – those URLs need to be updated..

If you don’t, your website won’t work properly.. It’s as simple as that. And changing your website address and WordPress address is much easier than visiting every post and page and updating them or following every URL in the database and changing it manually .

You can also do this via the command line. But if the words “command line” sound too technical or you don’t have access to it, a plugin may be the best – or only – choice you have..

Preparing for the update

Preparing for the update

There are two things you need to do before starting the update. The first thing to do is to backup your website. Since the changes are made to the database, you can only make a backup of them. If you already have a WordPress backup plugin, just make sure you have a recent backup handy in case something goes wrong.

The second thing you need to do is choose a plugin. You will have a few options, but the two that are highly recommended are the Velvet Blues Update URL plugin and the Better Search Replace plugin. Either will work fine for this purposebut the Best Search Replace can be useful if you want to search and replace your entire website.

Updating Your Website URLs Using the Velvet Blues Update URLs Plugin

Velvet Blues Update URL

If you want to update quickly and easily and nothing else, Velvet Blues Update URLs are for you. Head to Plugins > Add New and do a quick search using the plugin name. Install and activate it, then go to Tools > Update URLs.

You will notice that the plugin works in two steps. In the first step, you are supposed to add the old URL – the site address – which needs to be replaced, and the new URL with which you want to update your website URLs .

Update your website URLs

In the second step, you can choose the URLs to update. You will be able to limit yourself to updating only page content, excerpts, links, attachments or custom fields or meta boxes.. You will be able to choose any combination of the above for the update.

You will also be able to update all GUIDs, which you should only do if you know what GUIDs are and are specifically trying to change them. The plugin will tell you that you should only do this on development sites.

Choose any combination for update

After completing step 2, you can click the “Update URLs NOW” button and let Velvet Blue’s update URLs do its job.. You will be able to see how many items have been updated, and you can verify the success of the process by visiting anything you are updating using the changed URLs.

Updating Your Website URLs Using the Better Search Replace Plugin

Best Search Replace

Want to do a little more than just update URLs? Better Search Replace is a plugin that will allow you to do cool things such as changing a single word across the whole website or replacing things only in certain database tables. If this is something you feel you need to do in addition to updating your website URLs, head over to Plugins > Add New and search for Better Search Replace. After finding the plugin, install and activate it. Then head to Tools > Better Search Replace.

If you want to check the plug-in settings before implementing it, go to the Settings tab. There you will find little – only a slider that lets you choose the maximum page size. Usually this is what you want to reduce if you are having issues such as timeouts or white screens when performing a find and replace with the plugin.

Choose the maximum page size

Switching to the Find/Replace tab, you will see that the first thing you need to do is define what you are looking for and what you want to replace it with. Since you are updating URLs, you must enter the old URL and the new here.

Enter old URL and new URL

In the next step, you will be able to choose the tables in which you want to search and replace. Unless you know specifically which table contains the data you want to find and replace, you should select all tables. Shift + click is the easiest way to do this.

Select all paintings

Finally, you’ll be able to set whether searches should be case-sensitive or not, whether you want to override GUIDs – something you need to be careful with – and whether you want to run a find/replace like a try or the real thing.

Search Replace Plugin

The best strategy for using the plugin would be to perform a dry run first. After you finish it and get the notification about what would have been updated, you can uncheck the dry test box and do the search and replace for real. And that’s all.

Let’s get it over with!

Updating URLs is one of the most important things you need to do after migrating your website to a different address, subdirectory, or switching to HTTPS. The easiest way to do this is to use one of the two plugins we’ve listed here. Remember to back up the website first.