The decision to migrate a WordPress website is never an easy one. Even if the transition is something that will benefit the website and you as the owner – for example, a rebranding change of the domain – it is still a process that can leave you with a lot of work to be done. Updating all URLs is the type of job you have to do.
Good thing we have WordPress plugins! Thanks to them, you can take on the tedious task of updating URLs after migrating your WordPress website in an instant. And we’ll show you how!
In this article we will consider:
When WordPress assigns URLs to things like files, pages or posts on your website, they are stored in a database. Whenever you do something 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 do not do this, your website will not work properly.. It’s that simple. And changing your website address and WordPress address is much easier than visiting and updating every post and page, or tracking and manually changing every URL in the database.
You can also do this from the command line. But if the words “command line” sounds too technical to you or you don’t have access to it, a plugin may be the best – or only – option you have..
There are two things you need to do before you start the update. The first thing is to back up your website. Since the changes are made in the database, you can only take a backup. If you already have a WordPress backup plugin, make sure you have a fresh backup on hand in case something goes wrong.
The second thing you need to do is choose a plugin. You will have several options, but two highly recommended Velvet Blues Update URLs plugin and the Better Search Replace plugin. Either will work fine for this purposebut Better Search Replace It can come in handy if you want to do a search and replace on your entire website.
If you want a quick and easy update and nothing else, Velvet Blues Update URLs is the choice for you. get over your head Plugins > Add New and do a quick search using the name of the plugin. Install and activate and then Tools > Update URLs.
You will notice that the plugin works in two steps.. In the first step, you need to add the old URL (site address) that needs to be changed and the new URL where you want to update your website URLs.
In the second step, you choose which URLs to update. You can narrow down the page content only to updating 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; this is something you should only do if you know what the GUIDs are and especially if you are trying to change them. The plugin will let you know that you should only do this on development sites..
After completing step 2, you can click the “Update URLs NOW” button and let the Velvet Blue Update URLs do its job.. You will be able to see how many items have been updated and you can check the success of the action by visiting what you updated using the changed URLs.
Want to do a little more than just update URLs? Better Search Replace is a plugin that will let you do cool things like replace a single word on an entire website or just replace things in certain database tables.. If this is something you think you should do besides updating your website URLs, go to: Plugins > Add New and search for Better Search Replace. Once you find the plugin, install it and activate it. Then, to the Tools > Better Search Replace.
If you want to check the plugin settings before running it, go to the Settings tab. You’ll find very little there – only a slider that lets you choose the maximum page size. Typically, this is what you want to reduce if you run into issues like timeouts or white screens when performing a search and replacing with a plugin.
When you switch to the Search/Replace tab, you will see that the first thing you need to do is determine what you are looking for and what you want to replace it with. Since you are updating the URLs, you must enter the old URL and the new URL here..
In the next step, you will select the tables in which you want to search and replace. Unless you specifically know which table contains the data you want to search and replace, you should select all tables.. Shift + click is the easiest way to do this.
Finally, you’ll be able to set whether searches are case sensitive, if you want to change GUIDs (something you need to be careful about), and whether you want to do a search/replace as dry run or real thing.
The best strategy for using the plugin would be to perform a dry run first. Once you’re done and get the notification of what to update, you can uncheck the dry run box and search and change it to real. And that’s all.
Let’s wrap it up!
Updating URLs is one of the most important things you should do after moving 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. Just remember to backup the website first.
Support our work ❤️
If you enjoyed this article, consider leaving a tip to help us keep publishing great content.
























