How to Easily Update URLs When Moving Your WordPress Site

How to Easily Update URLs When Moving Your WordPress Site

The decision to migrate a WordPress website is never an easy one. Even if the migration in question is something that would benefit the website and you as its owner – a rebranding-driven change of the domain name, for example – it’s still a process that can leave you with lots of work that has to be done. Updating all the URLs is just the type of work you’ll have to do.

Good thing we have WordPress plugins, though! Thanks to them, you can get the tedious task of updating URLs after migrating your WordPress website. And we’ll show you how!

When and Why Do You Need to Update URLs?

Let’s suppose you moved a WordPress site to a new domain name. You can then change the WordPress address and site URL by visiting the Settings » General page from your WordPress dashboard.

How to Easily Update URLs When Moving Your WordPress Site

However, this doesn’t change the URLs that you have previously added in your posts and pages. It also does not change the URLs of images you have added to your WordPress site.

Changing all these URLs manually in every blog post and page can be time-consuming. Plus, there will always be a chance that you’ll miss some URLs, which can lead to broken links on your website.

That’s why it’s important to update your URLs when moving your WordPress website.

It helps in providing a smooth user experience for your users, as they’ll easily find the page they’re looking for. Updating URLs also improves your WordPress SEO and allows search engines to find new content for indexing.

Last but not least, you also want to ensure there are proper 301 redirects setup from your old domain to the new domain, so users are always redirected to the right place.

This is extremely important because there are likely other websites that are linking to your old domain including social media posts, Google, and more.

With that said, let’s see how you can quickly and easily update URLs when migrating your WordPress site.

Update URLs After Moving a WordPress Site

The easiest way to update old links on your website is by using the Go Live Update Urls plugin for WordPress. It’s a free WordPress plugin and lets you update URLs in your posts, pages, images, excerpts, widgets, and more.

However, make sure that you have a complete backup of your WordPress site before updating all the links. This will allow you to easily revert back in case something goes wrong during the update process.

Next, you’ll need to install and active the Go Live Update Urls on your site. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you can navigate to Tools » Go Live from your WordPress admin panel.

How to Easily Update URLs When Moving Your WordPress Site

After that, you can update URLs in your posts, comments, options, user data, and other areas of your site by checking the WordPress core tables options in the plugin.

WordPress core tables are where all your website data is organized and stored. For example, a wp_comments table will have all the information about comments on your site along with data about the person commenting.

Besides that, Go Live Update Urls also lets you update old URLs in the data used by different plugins on your website. However, this is an optional step and you can skip it.

How to Easily Update URLs When Moving Your WordPress Site

Next, you’ll need to scroll down to the section for updating the old links to the new URLs. Go ahead and enter the ‘Old URL’ and ‘New URL’ in the respective fields.

How to Easily Update URLs When Moving Your WordPress Site

Once that’s done, simply click the ‘Update Urls’ button. The plugin will now update all the URLs on your site to the new domain.

Redirect Posts & Pages After Updating URLs

After you’ve updated all the URLs on your website, you’ll now need to set up 301 redirects for your entire site to the new domain. This will preserve links from sites that were linking to your old domain and prevent 404 errors.

The easiest way of performing a full site redirect is by using the All in One SEO (AIOSEO) plugin. It’s the best SEO WordPress plugin and is trusted by over 3 million professionals.

AIOSEO offers a powerful redirection manager that lets you redirect old URLs to new ones in just a few clicks. The plugin also helps track 404 errors on your site, so you can quickly find and fix any broken link.

For this tutorial, we’ll be using the AIOSEO Pro version because it includes the redirection manager and other features like sitemaps, custom breadcrumbs, and schema markup. You can also try the free version of AIOSEO to get started.

The first thing you’ll need to do is install and activate the AIOSEO plugin on your site. If you need help, then please refer to our guide on how to install a WordPress plugin.

Upon activation, you will need to go to All in One SEO » Dashboard from your WordPress admin panel. Now click the ‘Launch the Setup Wizard’ button to configure the plugin.

How to Easily Update URLs When Moving Your WordPress Site

1. Setting up Full Site Redirects

This method is super useful when you’re merging two separate WordPress sites into one, or if you’re going to setup a new WordPress install for the new domain because it’ll handle a full site redirect without adding any code.

Simply head over to All in One SEO » Redirects from your WordPress admin area and click the ‘Activate Redirects’ button.

How to Easily Update URLs When Moving Your WordPress Site

Upon activation, you’ll need to navigate to the ‘Full Site Redirect’ tab and enable the ‘Relocate Site’ toggle. Next, you can enter your new domain name in the ‘Relocate to domain’ option.

How to Easily Update URLs When Moving Your WordPress Site

After entering your new domain URL, don’t forget to click the ‘Save Changes’ button to store your settings. AIOSEO will now redirect all the links on your site to the new URL.

2. Setting up Individual Post / Page Redirects

AIOSEO also offers different types of redirection methods that you can use to setup individual post / page redirects. We recommend selecting the ‘301 Moved Permanently’ redirection type, as it tells your browser that the page is moved to a new destination permanently and you don’t wish to move it back.

How to Easily Update URLs When Moving Your WordPress Site

Once you’ve filled out these details, simply click the ‘Add Redirect’ button.

If you want to see the different redirects you’ve created, then simply scroll down and view the logs.

How to Easily Update URLs When Moving Your WordPress Site

You can see the URLs, number of people that visited the link, the type of redirection you’ve set, and also choose whether to enable or disable the redirect.

In the ‘Settings’ tab under Redirects , you can choose to setup server level redirects as well which are way faster. The default method is set to PHP which is the easiest way to redirect old URLs, and it doesn’t require any server-side configuration.

But you can select ‘Web Server’ as the redirection method, and then choose either Apache or NGINX as your web server. We won’t recommend this method for beginners as it requires technical knowledge.

How to Easily Update URLs When Moving Your WordPress Site

Bonus: Track Broken Links on Your Website

When you update your URLs to a new domain, it’s also essential to keep an eye on any broken links. These are links that no longer exist and show a 404 error page. They can occur if any URL didn’t get updated properly.

With AIOSEO, it’s very easy to track and fix 404 error pages using the Redirection Manager.

To begin, you can head over to All in One SEO » Redirects from your WordPress dashboard.

Next, go ahead and click the ‘Settings’ tab under Redirects and then click on the toggle to enable the ‘404 Logs’ and ‘Redirect Logs’ options.

How to Easily Update URLs When Moving Your WordPress Site

Using AIOSEO, you can choose the time period to keep your 404 error logs. We recommend that you select no longer than one month for smooth and optimal WordPress performance.

Once you’ve enabled these options, click the ‘Save Changes’ button at the top to store your settings.

You should now see a new ‘404 Logs’ tab appear under Redirects in AIOSEO. It’s under this tab where the plugin will track and show 404 error pages on your website.

An important thing to note is that you won’t see any data under the 404 Logs tab at first. The plugin will only start to record broken links after you’ve enabled the settings.

However, once the setting is active, go ahead and click on the ‘404 Logs’ tab. You’ll see a list of broken links under the URL column, the number of visits under the Hits column, and the last accessed date.

How to Easily Update URLs When Moving Your WordPress Site

To fix any broken link, simply click the ‘Add Redirect’ button for the respective URL. AIOSEO will now show options to set up redirection for the 404 error URL.

Go ahead and enter the new link under the ‘Target URL’ field and select ‘301 Moved Permanently’ as the Redirection Type from the dropdown menu.

How to Easily Update URLs When Moving Your WordPress Site

Next, you’ll need to click the ‘Add Redirect’ button to fix the broken link on your website.

To check if the redirection is working, simply visit the old URL. If you’re redirected to the new URL, then it means you’ve successfully fixed 404 error pages.

Why Would You Need to Update URLs After Migrating a Website?

How to Easily Update URLs When Moving Your WordPress Site

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

If you don’t, your website won’t function properly. It’s as simple as that. And it’s much easier to change the address of your website and the WordPress address than it is to visit every post and page and update them or track every URL in the database and change it manually.

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

Preparing for the Update

How to Easily Update URLs When Moving Your WordPress Site

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 to the database, you can only make a backup of it. If you already have a WordPress backup plugin, just make sure you have a recent backup on hand in case something goes wrong.

The second thing you need to do is choose a plugin. You’ll have a few options, but the two that come highly recommended are the Velvet Blues Update URLs plugin and the Better Search Replace plugin. Either will work fine for this purpose, but the Better Search Replace might come in handy if you want to do a search and replace on your whole website.

Qode Themes: Top Picks

VIEW COLLECTION

How to Easily Update URLs When Moving Your WordPress Site

Bridge

Creative Multi-Purpose WordPress Theme

How to Easily Update URLs When Moving Your WordPress Site

Stockholm

A Genuinely Multi-Concept Theme

How to Easily Update URLs When Moving Your WordPress Site

Startit

Fresh Startup Business Theme

Updating Your Website URLs Using the Velvet Blues Update URLs Plugin

How to Easily Update URLs When Moving Your WordPress Site

If you want to do a quick and easy update and nothing else, Velvet Blues Update URLs is the choice for you. Head over to Plugins > Add New and do a quick search using the name of the plugin. Install it and activate it, and then head over to Tools > Update URLs.

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

How to Easily Update URLs When Moving Your WordPress Site

In the second step, you get to choose which URLs should be updated. You’ll be able to narrow down to updating only page content, excerpts, links, attachments, or custom fields or meta boxes. You’ll be able to choose any combination of the above for updating.

You’ll also be able to update all GUIDs, which is something you should only do if you know what GUIDs are and you’re specifically trying to change them. The plugin will let you know you should be doing it only on development sites.

How to Easily Update URLs When Moving Your WordPress Site

After finishing step 2, you can click on the “Update URLs NOW” button and let Velvet Blue Update URLs do its thing. You’ll be able to view how many items have been updated, and you can check the success of the process by visiting whatever you were updating using the changed URLs.

Updating Your Website URLs Using the Better Search Replace Plugin

How to Easily Update URLs When Moving Your WordPress Site

Want to do a bit more than just update URLs? Better Search Replace is a plugin that will let you do cool things such as change a single word on the whole website or replace things just in certain database tables. If this is something you think you should do besides 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 over to Tools > Better Search Replace.

If you want to check out the plugin settings before you put it to work, go to the Settings tab. You’ll find little there – only a slider that lets you choose the maximum page size. Usually, this is what you want to decrease if you experience issues such as timeouts or white screens when running a search and replace with the plugin.

How to Easily Update URLs When Moving Your WordPress Site

Switching to Search/Replace tab, you’ll see that the first thing you need to do is define what is it that you’re searching for, and what you want to replace it with. Because you’re updating URLs, you should enter the old URL and the new URL here.

How to Easily Update URLs When Moving Your WordPress Site

In the next step, you’ll get to choose the tables in which you want to perform the search and replace. Unless you know specifically which table contains the data you want to search and replace, you should select all of the tables. Shift + click is the easiest way to do it.

How to Easily Update URLs When Moving Your WordPress Site

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

How to Easily Update URLs When Moving Your WordPress Site

The best strategy to use the plugin would be to perform a dry run first. After finishing it and getting the notification on what would have been updated, you can uncheck the dry run box and do the search and replace for real. And that’s all there is to it.

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

Leave a Reply

Your email address will not be published. Required fields are marked *